GithubHelp home page GithubHelp logo

walterhua88 / sc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from infowangxin/sc

0.0 1.0 0.0 2.99 MB

基于SpringCloud微服务的示例项目、出发点是写一套完整微服务架构、集成有eureka、ribbon、feign、hystrix组件等,消费端有JSP、freemarker、thymeleaf三个版本,有完整的UI、增删改查及分页,防SQL注入、XSS攻击拦截等,同时集成了shiro、swagger2等,后面会持续完善 GitHub: https://github.com/wangxinforme/sc , 开源**: https://gitee.com/wangxinforme/sc

PLpgSQL 8.31% TSQL 0.01% Java 91.68%

sc's Introduction

sc 介绍

它是一个基于SpringCloud的分布式服务示例项目、集成有eureka、ribbon、feign、hystrix组件等,消费端有JSP、freemarker、thymeleaf三个版本,同时集成了shiro、swagger2等,后面会接着完善

包含工程有:

  • sc-commons:用于放common公共相关类的工程,所有工程都可以引用。

  • sc-eureka:Netflix Eureka云端负载均衡,一个基于REST的服务,用于定位服务,以实现云端的负载均衡和中间层服务器的故障转移。

  • sc-consumer-freemarker:client端,即consumer服务消费者,前端采用的是freemarker,集成了shiro。

  • sc-consumer-jsp:client端,即consumer服务消费者,前端采用的是jsp,集成了shiro。

  • sc-consumer-thymeleaf:client端,即consumer服务消费者,前端采用的是thymeleaf,集成了shiro。

  • sc-hystrix:集成hystrix的示例

  • sc-provider:server端,即provider服务提供端,端口是随机分配的,可以启动多个服务对ribbon验证服务负载,当中集成了swagger2

  • sc-feign:SpringCloud Netflix Feign,声明的接口。

示例启动

  • 初始化数据库,将sc/ddl/mysql_test.sql脚本初始化在默认数据库当中

  • 按顺序依次启动项目工程: sc-eureka、sc-provider、sc-consumer-freemarker、sc-consumer-jsp、sc-consumer-thymeleaf 启动方式,运行: com.wangxin.Application.main(String[]) 方法

  • 访问 sc-eureka 浏览器访问 http://localhost:1111 ,Application表格当中可以看到注册上来的server与client,表明启动都成功了

  • 访问 sc-provider 浏览器访问http://localhost:2000/msg ,看到“来自于server ...”则证明访问成功 浏览器访问http://localhost:2000 ,进入swagger2 ui页面

  • 访问 sc-consumer-freemarker 浏览器访问 http://localhost:3000,会看到登录页面

  • 访问 sc-consumer-jsp 浏览器访问 http://localhost:4000,会看到登录页面

  • 访问 sc-consumer-thymeleaf 浏览器访问 http://localhost:5000,会看到登录页面

GitHub issues

sc's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.