聚合子系统文档
This commit is contained in:
@@ -22,6 +22,11 @@
|
||||
<artifactId>boot-starter-ssm</artifactId>
|
||||
<version>${micro.fast.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.micro.fast</groupId>
|
||||
<artifactId>boot-starter-security-oauth</artifactId>
|
||||
<version>${micro.fast.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
|
||||
+6
-3
@@ -5,11 +5,14 @@ import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
||||
@MapperScan(basePackages = {"com.micro.fast.pa.dao"})
|
||||
public class PerformanceAppraisalApplication {
|
||||
@MapperScan(basePackages = {"com.lishouyu.upms.dao"})
|
||||
public class AllInOneApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(PerformanceAppraisalApplication.class, args);
|
||||
SpringApplication.run(AllInOneApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* micro-fast pa common
|
||||
* @author lishouyu
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.ucenter.common;
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* micro-fast pa controller
|
||||
* @author lishouyu
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.ucenter.controller;
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* micro-fast pa dao
|
||||
* @author lishouyu
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.ucenter.dao;
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* micro-fast pa pojo
|
||||
* @author lishouyu
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.ucenter.pojo;
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* micro-fast pa service impl
|
||||
* @author lishouyu
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.ucenter.service.impl;
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* micro-fast pa service
|
||||
* @author lishouyu
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.ucenter.service;
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* micro-fast pa util
|
||||
* @author lishouyu
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.ucenter.util;
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* micro-fast cms vo
|
||||
* @author lishouyu
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.ucenter.vo;
|
||||
+1
-1
@@ -4,4 +4,4 @@
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.common;
|
||||
package com.lishouyu.upms.common;
|
||||
+1
-1
@@ -4,4 +4,4 @@
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.controller;
|
||||
package com.lishouyu.upms.controller;
|
||||
+1
-1
@@ -4,4 +4,4 @@
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.dao;
|
||||
package com.lishouyu.upms.dao;
|
||||
@@ -0,0 +1 @@
|
||||
package com.lishouyu.upms;
|
||||
+1
-1
@@ -4,4 +4,4 @@
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.pojo;
|
||||
package com.lishouyu.upms.pojo;
|
||||
+1
-1
@@ -4,4 +4,4 @@
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.service.impl;
|
||||
package com.lishouyu.upms.service.impl;
|
||||
+1
-1
@@ -4,4 +4,4 @@
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.service;
|
||||
package com.lishouyu.upms.service;
|
||||
+1
-1
@@ -4,4 +4,4 @@
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.util;
|
||||
package com.lishouyu.upms.util;
|
||||
+1
-1
@@ -4,4 +4,4 @@
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
package com.lishouyu.vo;
|
||||
package com.lishouyu.upms.vo;
|
||||
@@ -1,43 +1,89 @@
|
||||
info:
|
||||
app:
|
||||
profiles: dev
|
||||
name: all-in-one
|
||||
description: all-in-one
|
||||
spring:
|
||||
application:
|
||||
name: pa
|
||||
name: all-in-one
|
||||
http:
|
||||
multipart:
|
||||
max-file-size: 10MB
|
||||
max-request-size: 20MB
|
||||
enabled: true
|
||||
mvc:
|
||||
view:
|
||||
suffix: .html
|
||||
freemarker:
|
||||
check-template-location: true
|
||||
template-loader-path: classpath:/templates
|
||||
content-type: text/html
|
||||
cache: false
|
||||
suffix: .html
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
datasource:
|
||||
druid:
|
||||
username: root
|
||||
password: studyj2e
|
||||
url: jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false
|
||||
master:
|
||||
initial-size: 19
|
||||
username: root
|
||||
password: studyj2e
|
||||
url: jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false
|
||||
#数据源共用基本配置
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
initial-size: 20
|
||||
max-active: 50
|
||||
min-idle: 10
|
||||
max-wait: 1000
|
||||
pool-prepared-statements: true
|
||||
test-on-borrow: true
|
||||
test-while-idle: true
|
||||
time-between-log-stats-millis: 10000
|
||||
min-evictable-idle-time-millis: 100000
|
||||
max-evictable-idle-time-millis: 200000
|
||||
default-auto-commit: true
|
||||
filters: stat,wall
|
||||
#url监控配置
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
url-pattern: /*
|
||||
exclusions: /static/*,/druid/*
|
||||
session-stat-enable: false
|
||||
stat-view-servlet:
|
||||
login-username: micro
|
||||
login-password: fast
|
||||
reset-enable: true
|
||||
allow: 127.0.0.1,172.17.0.1
|
||||
deny: 127.0.0.2
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
# aop拦截监控
|
||||
aop-patterns: com.micro.*
|
||||
#statFilter配置
|
||||
filter:
|
||||
stat:
|
||||
connection-stack-trace-enable: true
|
||||
db-type: mysql
|
||||
enabled: true
|
||||
log-slow-sql: true
|
||||
merge-sql: true
|
||||
slow-sql-millis: 2000
|
||||
aop:
|
||||
proxy-target-class: true
|
||||
profiles:
|
||||
active: dev
|
||||
server:
|
||||
port: 8080
|
||||
tomcat:
|
||||
uri-encoding: utf-8
|
||||
uri-encoding: utf-8
|
||||
feign:
|
||||
hystrix:
|
||||
enabled: true #开启监控熔断
|
||||
# 健康检查的相关配置
|
||||
management:
|
||||
security:
|
||||
enabled: false #springbooot1.5.*以后如果要使用refresh功能的要设置false
|
||||
port: 18080
|
||||
# --------------------------
|
||||
# 自定义的配置参数
|
||||
# --------------------------
|
||||
|
||||
#数据库连接配置类,这些参数是必须传入的
|
||||
jdbc:
|
||||
master:
|
||||
username: root
|
||||
password: hfAhyoTu3UKAfmy27/RNKQ==
|
||||
url: jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=true
|
||||
driverClass: com.mysql.jdbc.Driver
|
||||
mybatis:
|
||||
typeAliasesPackage: com.lishouyu.pojo
|
||||
typeAliasesPackage: com.lishouyu.upms.pojo
|
||||
mappers: classpath:/mappers/*.xml
|
||||
pageHelperProperties:
|
||||
- dialect:mysql
|
||||
# --------------------------
|
||||
# /自定义的配置参数
|
||||
# --------------------------
|
||||
# --------------------------
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class PerformanceAppraisalApplicationTests {
|
||||
public class AllInOneApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
@@ -1,8 +1,5 @@
|
||||
#欢迎查看boot-starter-security-app项目说明
|
||||
|
||||
#欢迎查看boot-starter-security-oauth项目说明
|
||||
##本项目的参数配置说明
|
||||
本项目说明中的配置参数是boot-starter-security-browser和boot-starter-security-app
|
||||
项目的交集
|
||||
- 用户登录接口url`/user/login`
|
||||
- 图片验证码获取接口url`/code/image` ,在进行图片验证码校验时传递参数为`imageCode`
|
||||
- `ms.security.code.image.width` 图片验证码宽度,默认值是`67` 可以在请求中使用`width`参数设置
|
||||
@@ -16,11 +13,9 @@
|
||||
- 短信验证码获取接口url`/code/sms` 传递参数为`phone`
|
||||
- `ms.security.code.sms.length` 短信验证码code的长度,默认值是`6`,不能在请求中设置
|
||||
- `ms.security.code.sms.expireIn` 短信验证码的默认有效时间是`60`秒,不能在请求中设置
|
||||
- `ms.security.code.sms.url`短信验证码进行耀眼的地址,默认值是`/user/login`,可以是`/user/*`这种格式,多个适用,号分割,不
|
||||
- `ms.security.code.sms.url`短信验证码进行校验的地址,默认值是`/user/login`,可以是`/user/*`这种格式,多个适用,号分割,不
|
||||
能在请求中设置
|
||||
- 同样的,可以实现`validateCode`生成验证码的方法,并定义名称为`smsCodeUtil`的bean便可替换原有的短信验证码的生成逻辑
|
||||
|
||||
- 短信登录的接口为`/authentication/mobile`,传递参数为`smsCode`和`mobile`
|
||||
- `ms.security.createRememberTable` 是否创建记住我表结构默认为`true`
|
||||
- oauth2发起的请求的用户需要有一个`ROLE_USER`的用户权限
|
||||
- oauth2中相同的用户会得到相同的token
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# 欢迎查看boot-starter-ssm项目说明
|
||||
[](LICENSE)
|
||||
## 项目介绍
|
||||
`boot-starter-ssm`项目用于快速开启spring集成mybatis的项目,将本项目使用maven发布到本地仓库,在其他项
|
||||
目中引入该依赖进行相关配置即可使用.
|
||||
|
||||
+3
-3
@@ -13,12 +13,12 @@
|
||||
注册中心2默认启动端口号10004,健康检查端口号10005.
|
||||
### 服务网关 gateway
|
||||
服务网关默认启动端口号10006,健康检查端口号10007.
|
||||
### 用户权限管理中心 upms
|
||||
### 后台权限管理中心 upms
|
||||
用户权限管理中心默认启动端口号10008,健康检查端口号10009.
|
||||
### 用户中心 ucenter
|
||||
用户中心默认启动端口号10010,健康检查端口10011.
|
||||
### 内容管理系统 cms
|
||||
内容管理系统默认启动端口号10012,健康检查端口号10013.
|
||||
### 认证中心 oauth
|
||||
认证中心默认启动端口号10012,健康检查端口号10013.
|
||||
|
||||
### 后台管理界面 manage-system
|
||||
使用vue.js搭建后台管理界面
|
||||
|
||||
@@ -3,10 +3,6 @@ server:
|
||||
# 健康检查的相关配置
|
||||
management:
|
||||
health:
|
||||
mail:
|
||||
enabled: false
|
||||
redis:
|
||||
enabled: false
|
||||
diskspace:
|
||||
enabled: true
|
||||
port: 10001
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
cd cms
|
||||
mvn docker:build
|
||||
cd ../config-server/
|
||||
mvn docker:build
|
||||
cd ../gateway/
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
cd cms
|
||||
mvn docker:push
|
||||
cd ../config-server/
|
||||
mvn docker:push
|
||||
cd ../gateway/
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
cd cms
|
||||
mvn docker:removeImage
|
||||
cd ../config-server/
|
||||
mvn docker:removeImage
|
||||
cd ../gateway/
|
||||
|
||||
@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.cloud.client.SpringCloudApplication;
|
||||
import org.springframework.cloud.netflix.feign.EnableFeignClients;
|
||||
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
/**
|
||||
* 整个应用的服务网关,进行路由的规则的设置,登录以及权限的检验
|
||||
@@ -12,8 +13,11 @@ import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
|
||||
* @version 1.0
|
||||
*/
|
||||
@SpringCloudApplication
|
||||
@EnableZuulProxy //开启路径代理
|
||||
@EnableFeignClients //开启feign对服务的调用
|
||||
//开启路径代理
|
||||
@EnableZuulProxy
|
||||
//开启feign对服务的调用
|
||||
@EnableFeignClients
|
||||
@EnableSwagger2
|
||||
public class GatewayApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -18,8 +18,8 @@ public class DocumentationConfig implements SwaggerResourcesProvider {
|
||||
@Override
|
||||
public List<SwaggerResource> get() {
|
||||
List resources = new ArrayList<>();
|
||||
resources.add(swaggerResource("订单系统", "/order/v2/api-docs", "2.0"));
|
||||
resources.add(swaggerResource("支付系统", "/pay/v2/api-docs", "2.0"));
|
||||
resources.add(swaggerResource("用户中心", "/ucenter/api/api-doc", "2.0"));
|
||||
resources.add(swaggerResource("后台权限控制系统", "/upms/api/api-doc", "2.0"));
|
||||
return resources;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
package com.micro.fast.gateway.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.context.request.async.DeferredResult;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.service.Contact;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
import static com.google.common.base.Predicates.or;
|
||||
import static springfox.documentation.builders.PathSelectors.regex;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
* swagger文档生成配置
|
||||
*/
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
public class SwaggerUiConfig {
|
||||
@Bean
|
||||
public Docket testApi() {
|
||||
return new Docket(DocumentationType.SPRING_WEB)
|
||||
.groupName("portalUser")
|
||||
.genericModelSubstitutes(DeferredResult.class)
|
||||
//.genericModelSubstitutes(ResponseEntity.class)
|
||||
.useDefaultResponseMessages(false)
|
||||
.forCodeGeneration(true)
|
||||
// base,最终调用接口后会和paths拼接在一起
|
||||
.pathMapping("/")
|
||||
.select()
|
||||
//需要进行写入文档的接口
|
||||
.paths(or(regex("/tesco/user/.*")))
|
||||
.build()
|
||||
.apiInfo(portalUserApiInfo());
|
||||
}
|
||||
|
||||
private ApiInfo portalUserApiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
//大标题
|
||||
.title("MS系统文档")
|
||||
//详细描述
|
||||
.description("系统接口说明")
|
||||
//版本
|
||||
.version("0.0.1-SNAPSHOT")
|
||||
.termsOfServiceUrl("NO terms of service")
|
||||
//作者
|
||||
.contact(new Contact("李守余", "http://kklt1996.gitee.io/blog/", "18332763730@163.com"))
|
||||
.license("The Apache License, Version 2.0")
|
||||
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,7 +23,7 @@ public class WebConfig{
|
||||
final UrlBasedCorsConfigurationSource urlBasedCorsConfigurationSource = new UrlBasedCorsConfigurationSource();
|
||||
final CorsConfiguration corsConfiguration = new CorsConfiguration();
|
||||
//允许cookie跨域,在cookie跨域的时候,服务端进行设置,浏览器端也要进行显式设置是否发送。
|
||||
corsConfiguration.setAllowCredentials(true);
|
||||
// corsConfiguration.setAllowCredentials(true);
|
||||
//能给这个服务器发起请求的url,当这个值设置为*的时候,cookie就不能随着请求进行发送了。因为cookie必须是同源的。
|
||||
corsConfiguration.addAllowedOrigin("http://fthipw.natappfree.cc");
|
||||
//允许的请求头为全部
|
||||
|
||||
@@ -16,11 +16,7 @@ eureka:
|
||||
defaultZone: http://micro:fast@www.register1.com:10002/eureka/,http://micro:fast@www.register2.com:10004/eureka/ #配置所有的注册中心
|
||||
instance:
|
||||
hostname: fthipw.natappfree.cc
|
||||
springfox:
|
||||
documentation:
|
||||
swagger:
|
||||
v2:
|
||||
path: /api/api-doc
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# 从配置中心加载文件
|
||||
spring:
|
||||
session:
|
||||
store-type: none
|
||||
cloud:
|
||||
config:
|
||||
profile: dev
|
||||
@@ -12,11 +10,6 @@ spring:
|
||||
enabled: true
|
||||
username: config
|
||||
password: server
|
||||
datasource:
|
||||
data-username:
|
||||
data-password:
|
||||
aop:
|
||||
proxy-target-class: true
|
||||
eureka:
|
||||
client:
|
||||
serviceUrl:
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.micro.fast.ucenter.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
* swagger文档生成配置
|
||||
*/
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
public class SwaggerConfig {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.micro.fast.upms.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
* swagger文档生成配置
|
||||
*/
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
public class SwaggerConfig {
|
||||
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
# 从配置中心加载文件
|
||||
# druid 数据库加密的公钥
|
||||
spring:
|
||||
session:
|
||||
store-type: none
|
||||
@@ -13,57 +12,6 @@ spring:
|
||||
enabled: true
|
||||
username: config
|
||||
password: server
|
||||
datasource:
|
||||
druid:
|
||||
username: root
|
||||
password: studyj2e
|
||||
url: jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false
|
||||
master:
|
||||
initial-size: 19
|
||||
username: root
|
||||
password: studyj2e
|
||||
url: jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false
|
||||
# 数据源共用基本配置
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
initial-size: 20
|
||||
max-active: 50
|
||||
min-idle: 10
|
||||
max-wait: 1000
|
||||
pool-prepared-statements: true
|
||||
test-on-borrow: true
|
||||
test-while-idle: true
|
||||
time-between-log-stats-millis: 10000
|
||||
min-evictable-idle-time-millis: 100000
|
||||
max-evictable-idle-time-millis: 200000
|
||||
default-auto-commit: true
|
||||
filters: stat,wall
|
||||
# url监控配置
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
url-pattern: /*
|
||||
exclusions: /static/*,/druid/*
|
||||
session-stat-enable: false
|
||||
stat-view-servlet:
|
||||
login-username: micro
|
||||
login-password: fast
|
||||
reset-enable: true
|
||||
allow: 127.0.0.1,172.17.0.1
|
||||
deny: 127.0.0.2
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
# aop拦截监控
|
||||
aop-patterns: com.micro.*
|
||||
# statFilter配置
|
||||
filter:
|
||||
stat:
|
||||
connection-stack-trace-enable: true
|
||||
db-type: mysql
|
||||
enabled: true
|
||||
log-slow-sql: true
|
||||
merge-sql: true
|
||||
slow-sql-millis: 2000
|
||||
aop:
|
||||
proxy-target-class: true
|
||||
eureka:
|
||||
client:
|
||||
serviceUrl:
|
||||
|
||||
Reference in New Issue
Block a user