diff --git a/cskefu-auth/pom.xml b/cskefu-auth/pom.xml new file mode 100644 index 00000000..2649002d --- /dev/null +++ b/cskefu-auth/pom.xml @@ -0,0 +1,113 @@ + + + com.cskefu + cskefu-auth + 0.0.1-SNAPSHOT + 4.0.0 + cskefu-auth + https://www.cskefu.com/ + + UTF-8 + 11 + 11 + 11 + 2.7.4 + 2021.0.4 + 2.2.2 + 1.18.6 + 8.0.30 + 3.17.7 + 3.0.0 + + + + com.cskefu + cskefu-common + 0.0.1-SNAPSHOT + + + org.springframework.boot + spring-boot-starter-webflux + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-data-redis + + + org.springframework.boot + spring-boot-starter-validation + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + + org.redisson + redisson-spring-boot-starter + ${redisson-spring.version} + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${mybatis-spring.version} + + + mysql + mysql-connector-java + ${mysql-connector.version} + runtime + + + io.springfox + springfox-swagger2 + ${swagger.version} + + + io.springfox + springfox-swagger-ui + ${swagger.version} + + + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + com.alibaba.cloud + spring-cloud-alibaba-dependencies + ${spring-cloud.version}.0 + pom + import + + + + diff --git a/cskefu-auth/src/main/java/com/cskefu/auth/CskefuAuthApplication.java b/cskefu-auth/src/main/java/com/cskefu/auth/CskefuAuthApplication.java new file mode 100644 index 00000000..e8fd07dc --- /dev/null +++ b/cskefu-auth/src/main/java/com/cskefu/auth/CskefuAuthApplication.java @@ -0,0 +1,11 @@ +package com.cskefu.auth; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class CskefuAuthApplication { + public static void main(String[] args) { + SpringApplication.run(CskefuAuthApplication.class, args); + } +} \ No newline at end of file diff --git a/cskefu-auth/src/main/resources/application-dev.yml b/cskefu-auth/src/main/resources/application-dev.yml new file mode 100644 index 00000000..cc21aa76 --- /dev/null +++ b/cskefu-auth/src/main/resources/application-dev.yml @@ -0,0 +1,29 @@ +spring: + datasource: + url: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 + username: root + password: 123456 + + cloud: + # sentinel配置 + sentinel: + eager: true + transport: + dashboard: + 127.0.0.1:8848 + port: 8719 + heartbeat-interval-ms: 5000 + nacos: + # 注册中心配置 + discovery: + server-addr: localhost:8848 + namespace: xxxxxxx +# # 配置中心 +# config: +# server-addr: 127.0.0.1:8848 +# file-extension: yaml +# namespace: jm-live-dev +# shared-configs[0]: +# group: sentinel +# data-id: sentinel-shared.yaml +# refresh: true diff --git a/cskefu-auth/src/main/resources/application-pro.yml b/cskefu-auth/src/main/resources/application-pro.yml new file mode 100644 index 00000000..e69de29b diff --git a/cskefu-auth/src/main/resources/application.yml b/cskefu-auth/src/main/resources/application.yml new file mode 100644 index 00000000..c2221f85 --- /dev/null +++ b/cskefu-auth/src/main/resources/application.yml @@ -0,0 +1,28 @@ +spring: + application: + name: cskefu + profiles: + active: dev + datasource: + type: com.zaxxer.hikari.HikariDataSource + driver-class-name: com.mysql.cj.jdbc.Driver + hikari: + connection-timeout: 5000 + minimum-idle: 5 + maximum-pool-size: 20 + auto-commit: false + idle-timeout: 600000 + pool-name: DataSourceHikariCP + max-lifetime: 1800000 + connection-test-query: select 1 + redis: + host: 127.0.0.1 + port: 6379 + timeout: 5000 + database: 0 + lettuce: + pool: + max-active: 8 + max-idle: 8 + min-idle: 0 + max-wait: -1ms diff --git a/cskefu-biz/pom.xml b/cskefu-biz/pom.xml new file mode 100644 index 00000000..b6a168d2 --- /dev/null +++ b/cskefu-biz/pom.xml @@ -0,0 +1,103 @@ + + + com.cskefu + cskefu-biz + 0.0.1-SNAPSHOT + 4.0.0 + cskefu-biz + https://www.cskefu.com/ + + UTF-8 + 11 + 11 + 11 + 2.7.4 + 2021.0.4 + 2.2.2 + 1.18.6 + 8.0.30 + 3.17.7 + 3.0.0 + + + + com.cskefu + cskefu-common + 0.0.1-SNAPSHOT + + + org.springframework.boot + spring-boot-starter-webflux + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-data-redis + + + org.springframework.boot + spring-boot-starter-validation + + + org.projectlombok + lombok + ${lombok.version} + + + org.redisson + redisson-spring-boot-starter + ${redisson-spring.version} + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${mybatis-spring.version} + + + mysql + mysql-connector-java + ${mysql-connector.version} + runtime + + + io.springfox + springfox-swagger2 + ${swagger.version} + + + io.springfox + springfox-swagger-ui + ${swagger.version} + + + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + com.alibaba.cloud + spring-cloud-alibaba-dependencies + ${spring-cloud.version}.0 + pom + import + + + + diff --git a/cskefu-biz/src/main/java/com/cskefu/biz/CskefuBIZApplication.java b/cskefu-biz/src/main/java/com/cskefu/biz/CskefuBIZApplication.java new file mode 100644 index 00000000..cbc11eb6 --- /dev/null +++ b/cskefu-biz/src/main/java/com/cskefu/biz/CskefuBIZApplication.java @@ -0,0 +1,11 @@ +package com.cskefu.biz; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class CskefuBIZApplication { + public static void main(String[] args) { + SpringApplication.run(CskefuBIZApplication.class, args); + } +} \ No newline at end of file diff --git a/cskefu-biz/src/main/java/com/cskefu/biz/swagger/SwaggerConfiguration.java b/cskefu-biz/src/main/java/com/cskefu/biz/swagger/SwaggerConfiguration.java new file mode 100644 index 00000000..63fa3bd8 --- /dev/null +++ b/cskefu-biz/src/main/java/com/cskefu/biz/swagger/SwaggerConfiguration.java @@ -0,0 +1,59 @@ +package com.cskefu.biz.swagger; + +import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.service.*; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spi.service.contexts.SecurityContext; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +@Configuration +@EnableSwagger2 +public class SwaggerConfiguration { + @Bean + public Docket createRestApi() { + return new Docket(DocumentationType.OAS_30) + .apiInfo(apiInfo()) + .select() + .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) + .paths(PathSelectors.regex("(?!/error.*).*")) + .build() + .securityContexts(Arrays.asList(securityContext())) + .securitySchemes(Arrays.asList(new ApiKey("token", "token", SecuritySchemeIn.HEADER.name()))); + } + + private SecurityContext securityContext() { + return SecurityContext.builder() + .securityReferences(defaultAuth()) + //.forPaths(PathSelectors.regex("/*.*")) + .build(); + } + + private List defaultAuth() { + AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); + AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; + authorizationScopes[0] = authorizationScope; + return Collections.singletonList(new SecurityReference("token", authorizationScopes)); + } + + private ApiInfo apiInfo() { + return new ApiInfoBuilder() + .title("cskefu Swagger API") + .description("春松客服Swagger API") + .contact(new Contact("cskefu", "https://www.cskefu.com/", "dev@lists.cskefu.com")) + .license("Apache License Version 2.0") + .licenseUrl("http://www.apache.org/licenese/LICENSE-2.0") + .version("1.0") + .build(); + } +} \ No newline at end of file diff --git a/cskefu-biz/src/main/resources/application-dev.yml b/cskefu-biz/src/main/resources/application-dev.yml new file mode 100644 index 00000000..cc21aa76 --- /dev/null +++ b/cskefu-biz/src/main/resources/application-dev.yml @@ -0,0 +1,29 @@ +spring: + datasource: + url: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 + username: root + password: 123456 + + cloud: + # sentinel配置 + sentinel: + eager: true + transport: + dashboard: + 127.0.0.1:8848 + port: 8719 + heartbeat-interval-ms: 5000 + nacos: + # 注册中心配置 + discovery: + server-addr: localhost:8848 + namespace: xxxxxxx +# # 配置中心 +# config: +# server-addr: 127.0.0.1:8848 +# file-extension: yaml +# namespace: jm-live-dev +# shared-configs[0]: +# group: sentinel +# data-id: sentinel-shared.yaml +# refresh: true diff --git a/cskefu-biz/src/main/resources/application-pro.yml b/cskefu-biz/src/main/resources/application-pro.yml new file mode 100644 index 00000000..e69de29b diff --git a/cskefu-biz/src/main/resources/application.yml b/cskefu-biz/src/main/resources/application.yml new file mode 100644 index 00000000..c2221f85 --- /dev/null +++ b/cskefu-biz/src/main/resources/application.yml @@ -0,0 +1,28 @@ +spring: + application: + name: cskefu + profiles: + active: dev + datasource: + type: com.zaxxer.hikari.HikariDataSource + driver-class-name: com.mysql.cj.jdbc.Driver + hikari: + connection-timeout: 5000 + minimum-idle: 5 + maximum-pool-size: 20 + auto-commit: false + idle-timeout: 600000 + pool-name: DataSourceHikariCP + max-lifetime: 1800000 + connection-test-query: select 1 + redis: + host: 127.0.0.1 + port: 6379 + timeout: 5000 + database: 0 + lettuce: + pool: + max-active: 8 + max-idle: 8 + min-idle: 0 + max-wait: -1ms diff --git a/cskefu-common/pom.xml b/cskefu-common/pom.xml new file mode 100644 index 00000000..ebb66bc4 --- /dev/null +++ b/cskefu-common/pom.xml @@ -0,0 +1,56 @@ + + + com.cskefu + cskefu-common + 0.0.1-SNAPSHOT + 4.0.0 + cskefu-common + https://www.cskefu.com/ + + UTF-8 + 11 + 11 + 11 + 2.7.4 + 2021.0.4 + 2.2.2 + 1.18.6 + 8.0.30 + 3.17.7 + 3.0.0 + + + + org.projectlombok + lombok + ${lombok.version} + + + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + com.alibaba.cloud + spring-cloud-alibaba-dependencies + ${spring-cloud.version}.0 + pom + import + + + + diff --git a/cskefu-common/src/main/java/com/cskefu/common/BaseEntity.java b/cskefu-common/src/main/java/com/cskefu/common/BaseEntity.java new file mode 100644 index 00000000..f29c3b5a --- /dev/null +++ b/cskefu-common/src/main/java/com/cskefu/common/BaseEntity.java @@ -0,0 +1,22 @@ +package com.cskefu.common; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.Date; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class BaseEntity implements Serializable { + private static final long serialVersionUID = -6751846719593132836L; + private T id; + private Date createTime; + private Date updateTime; + private String creator; + private String updator; + private Boolean deleted; + private Integer version; +} diff --git a/cskefu-common/src/main/java/com/cskefu/common/Result.java b/cskefu-common/src/main/java/com/cskefu/common/Result.java new file mode 100644 index 00000000..4bad9023 --- /dev/null +++ b/cskefu-common/src/main/java/com/cskefu/common/Result.java @@ -0,0 +1,82 @@ +package com.cskefu.common; + +import lombok.Getter; + +@Getter +public class Result { + + public interface View { + } + + private final boolean success; + private final int code; + private final T data; + private final String message; + + Result(boolean success, int code, T data, String message) { + this.success = success; + this.code = code; + this.data = data; + this.message = message; + } + + public static ResultBuilder builder() { + return new ResultBuilder<>(); + } + + public static Result success() { + return Result.builder().code(0).success(true).build(); + } + + public static Result success(int code, T data) { + return Result.builder().code(code).success(true).data(data).build(); + } + + public static Result error(int code, String i18nMessage) { + return Result.builder().code(code).success(false).message(i18nMessage).build(); + } + + @Override + public String toString() { + return "Result(success=" + this.success + ", code=" + this.code + ", data=" + this.data + ", message=" + this.message + ")"; + } + + public static class ResultBuilder { + private boolean success; + private int code; + private T data; + private String message; + + ResultBuilder() { + } + + public ResultBuilder success(boolean success) { + this.success = success; + return this; + } + + public ResultBuilder code(int code) { + this.code = code; + return this; + } + + public ResultBuilder data(T data) { + this.data = data; + return this; + } + + public ResultBuilder message(String message) { + this.message = message; + return this; + } + + public Result build() { + return new Result<>(this.success, this.code, this.data, this.message); + } + + @Override + public String toString() { + return this.getClass().getName() + "(success=" + this.success + ", code=" + this.code + ", data=" + this.data + ", message=" + this.message + ")"; + } + } +} diff --git a/cskefu-gateway/pom.xml b/cskefu-gateway/pom.xml new file mode 100644 index 00000000..5115d319 --- /dev/null +++ b/cskefu-gateway/pom.xml @@ -0,0 +1,60 @@ + + + com.cskefu + cskefu-gateway + 0.0.1-SNAPSHOT + 4.0.0 + cskefu-gateway + https://www.cskefu.com/ + + UTF-8 + 11 + 11 + 11 + 2.7.4 + 2021.0.4 + 2.2.2 + 1.18.6 + 8.0.30 + 3.17.7 + 3.0.0 + + + + com.cskefu + cskefu-common + 0.0.1-SNAPSHOT + + + org.springframework.cloud + spring-cloud-starter-gateway + + + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + com.alibaba.cloud + spring-cloud-alibaba-dependencies + ${spring-cloud.version}.0 + pom + import + + + + diff --git a/cskefu-gateway/src/main/java/com/cskefu/gateway/CskefuGatewayApplication.java b/cskefu-gateway/src/main/java/com/cskefu/gateway/CskefuGatewayApplication.java new file mode 100644 index 00000000..ed6590e5 --- /dev/null +++ b/cskefu-gateway/src/main/java/com/cskefu/gateway/CskefuGatewayApplication.java @@ -0,0 +1,11 @@ +package com.cskefu.gateway; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class CskefuGatewayApplication { + public static void main(String[] args) { + SpringApplication.run(CskefuGatewayApplication.class, args); + } +} \ No newline at end of file diff --git a/cskefu-gateway/src/main/resources/application-dev.yml b/cskefu-gateway/src/main/resources/application-dev.yml new file mode 100644 index 00000000..cc21aa76 --- /dev/null +++ b/cskefu-gateway/src/main/resources/application-dev.yml @@ -0,0 +1,29 @@ +spring: + datasource: + url: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 + username: root + password: 123456 + + cloud: + # sentinel配置 + sentinel: + eager: true + transport: + dashboard: + 127.0.0.1:8848 + port: 8719 + heartbeat-interval-ms: 5000 + nacos: + # 注册中心配置 + discovery: + server-addr: localhost:8848 + namespace: xxxxxxx +# # 配置中心 +# config: +# server-addr: 127.0.0.1:8848 +# file-extension: yaml +# namespace: jm-live-dev +# shared-configs[0]: +# group: sentinel +# data-id: sentinel-shared.yaml +# refresh: true diff --git a/cskefu-gateway/src/main/resources/application-pro.yml b/cskefu-gateway/src/main/resources/application-pro.yml new file mode 100644 index 00000000..e69de29b diff --git a/cskefu-gateway/src/main/resources/application.yml b/cskefu-gateway/src/main/resources/application.yml new file mode 100644 index 00000000..127952d2 --- /dev/null +++ b/cskefu-gateway/src/main/resources/application.yml @@ -0,0 +1,5 @@ +spring: + application: + name: cskefu-gateway + profiles: + active: dev diff --git a/cskefu-session/pom.xml b/cskefu-session/pom.xml new file mode 100644 index 00000000..1764c626 --- /dev/null +++ b/cskefu-session/pom.xml @@ -0,0 +1,98 @@ + + + com.cskefu + cskefu-session + 0.0.1-SNAPSHOT + 4.0.0 + cskefu-session + https://www.cskefu.com/ + + UTF-8 + 11 + 11 + 11 + 2.7.4 + 2021.0.4 + 2.2.2 + 1.18.6 + 8.0.30 + 3.17.7 + 3.0.0 + + + + com.cskefu + cskefu-common + 0.0.1-SNAPSHOT + + + org.springframework.boot + spring-boot-starter-webflux + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-data-redis + + + org.springframework.boot + spring-boot-starter-validation + + + org.redisson + redisson-spring-boot-starter + ${redisson-spring.version} + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${mybatis-spring.version} + + + mysql + mysql-connector-java + ${mysql-connector.version} + runtime + + + io.springfox + springfox-swagger2 + ${swagger.version} + + + io.springfox + springfox-swagger-ui + ${swagger.version} + + + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + com.alibaba.cloud + spring-cloud-alibaba-dependencies + ${spring-cloud.version}.0 + pom + import + + + + diff --git a/cskefu-session/src/main/java/com/cskefu/io/CskefuSessionApplication.java b/cskefu-session/src/main/java/com/cskefu/io/CskefuSessionApplication.java new file mode 100644 index 00000000..c91577e7 --- /dev/null +++ b/cskefu-session/src/main/java/com/cskefu/io/CskefuSessionApplication.java @@ -0,0 +1,11 @@ +package com.cskefu.io; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class CskefuSessionApplication { + public static void main(String[] args) { + SpringApplication.run(CskefuSessionApplication.class, args); + } +} \ No newline at end of file diff --git a/cskefu-session/src/main/java/com/cskefu/io/swagger/SwaggerConfiguration.java b/cskefu-session/src/main/java/com/cskefu/io/swagger/SwaggerConfiguration.java new file mode 100644 index 00000000..aef1757a --- /dev/null +++ b/cskefu-session/src/main/java/com/cskefu/io/swagger/SwaggerConfiguration.java @@ -0,0 +1,59 @@ +package com.cskefu.io.swagger; + +import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.service.*; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spi.service.contexts.SecurityContext; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +@Configuration +@EnableSwagger2 +public class SwaggerConfiguration { + @Bean + public Docket createRestApi() { + return new Docket(DocumentationType.OAS_30) + .apiInfo(apiInfo()) + .select() + .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) + .paths(PathSelectors.regex("(?!/error.*).*")) + .build() + .securityContexts(Arrays.asList(securityContext())) + .securitySchemes(Arrays.asList(new ApiKey("token", "token", SecuritySchemeIn.HEADER.name()))); + } + + private SecurityContext securityContext() { + return SecurityContext.builder() + .securityReferences(defaultAuth()) + //.forPaths(PathSelectors.regex("/*.*")) + .build(); + } + + private List defaultAuth() { + AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); + AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; + authorizationScopes[0] = authorizationScope; + return Collections.singletonList(new SecurityReference("token", authorizationScopes)); + } + + private ApiInfo apiInfo() { + return new ApiInfoBuilder() + .title("cskefu Swagger API") + .description("春松客服Swagger API") + .contact(new Contact("cskefu", "https://www.cskefu.com/", "dev@lists.cskefu.com")) + .license("Apache License Version 2.0") + .licenseUrl("http://www.apache.org/licenese/LICENSE-2.0") + .version("1.0") + .build(); + } +} \ No newline at end of file diff --git a/cskefu-session/src/main/resources/application-dev.yml b/cskefu-session/src/main/resources/application-dev.yml new file mode 100644 index 00000000..cc21aa76 --- /dev/null +++ b/cskefu-session/src/main/resources/application-dev.yml @@ -0,0 +1,29 @@ +spring: + datasource: + url: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 + username: root + password: 123456 + + cloud: + # sentinel配置 + sentinel: + eager: true + transport: + dashboard: + 127.0.0.1:8848 + port: 8719 + heartbeat-interval-ms: 5000 + nacos: + # 注册中心配置 + discovery: + server-addr: localhost:8848 + namespace: xxxxxxx +# # 配置中心 +# config: +# server-addr: 127.0.0.1:8848 +# file-extension: yaml +# namespace: jm-live-dev +# shared-configs[0]: +# group: sentinel +# data-id: sentinel-shared.yaml +# refresh: true diff --git a/cskefu-session/src/main/resources/application-pro.yml b/cskefu-session/src/main/resources/application-pro.yml new file mode 100644 index 00000000..e69de29b diff --git a/cskefu-session/src/main/resources/application.yml b/cskefu-session/src/main/resources/application.yml new file mode 100644 index 00000000..c2221f85 --- /dev/null +++ b/cskefu-session/src/main/resources/application.yml @@ -0,0 +1,28 @@ +spring: + application: + name: cskefu + profiles: + active: dev + datasource: + type: com.zaxxer.hikari.HikariDataSource + driver-class-name: com.mysql.cj.jdbc.Driver + hikari: + connection-timeout: 5000 + minimum-idle: 5 + maximum-pool-size: 20 + auto-commit: false + idle-timeout: 600000 + pool-name: DataSourceHikariCP + max-lifetime: 1800000 + connection-test-query: select 1 + redis: + host: 127.0.0.1 + port: 6379 + timeout: 5000 + database: 0 + lettuce: + pool: + max-active: 8 + max-idle: 8 + min-idle: 0 + max-wait: -1ms