diff --git a/zteits-job/pom.xml b/zteits-job/pom.xml index 161d640..7fe0e90 100644 --- a/zteits-job/pom.xml +++ b/zteits-job/pom.xml @@ -1,183 +1,182 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - com.zteits.job - zteits-job - 0.0.1-SNAPSHOT - jar + com.zteits.job + zteits-job + 2.0.1-SNAPSHOT + jar - zteits-job - Demo project for Spring Boot - - org.springframework.boot - spring-boot-starter-parent - 1.5.9.RELEASE - - + zteits-job + Demo project for Spring Boot + + org.springframework.boot + spring-boot-starter-parent + 2.0.5.RELEASE + + - - UTF-8 - UTF-8 - 1.8 - 1.3.1.RELEASE - 5.1.21 - 3.0.5 - 3.4.4 - 1.0.29 - 1.1.0 - 5.1.42 - 4.12 - 3.4.0 - 4.1.6 - 1.1.7 - + + UTF-8 + UTF-8 + 1.8 + 5.1.21 + 3.0.5 + 3.4.4 + 1.0.29 + 1.1.0 + 5.1.42 + 4.12 + 3.4.0 + 4.1.6 + 1.1.7 + - - - - com.zteits - zteits-framework - 0.0.1-SNAPSHOT - - - org.apache.httpcomponents - httpclient - - - org.springframework.boot - spring-boot-starter-test - test - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-aop - - - org.springframework.boot - spring-boot-starter-redis - 1.4.7.RELEASE - - - - org.springframework.session - spring-session - - - - com.xiaoleilu - hutool-all - ${hutool-all.version} - - - com.alibaba - fastjson - 1.2.47 - - - junit - junit - ${junit.version} - test - - - org.slf4j - slf4j-api - 1.7.21 - - - - ch.qos.logback - logback-classic - ${logback.version} - - - ch.qos.logback - logback-core - ${logback.version} - - - org.springframework.boot - spring-boot-starter-data-jpa - - - org.springframework.boot - spring-boot-starter-freemarker - - - - mysql - mysql-connector-java - ${mysql.version} - - - - com.alibaba - druid - 1.0.31 - + + + + com.zteits + zteits-framework + 2.0.1-SNAPSHOT + + + org.apache.httpcomponents + httpclient + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-aop + + + org.springframework.boot + spring-boot-starter-data-redis + 2.0.5.RELEASE + + + org.springframework.session + spring-session-data-redis + 2.0.5.RELEASE + + + + com.xiaoleilu + hutool-all + ${hutool-all.version} + + + com.alibaba + fastjson + 1.2.47 + + + junit + junit + ${junit.version} + test + + + org.slf4j + slf4j-api + 1.7.21 + + + + ch.qos.logback + logback-classic + ${logback.version} + + + ch.qos.logback + logback-core + ${logback.version} + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-freemarker + + + + mysql + mysql-connector-java + ${mysql.version} + + + + com.alibaba + druid + 1.0.31 + - - - org.mybatis - mybatis - 3.4.4 - - - org.mybatis - mybatis-spring - 1.3.1 - - - - org.mybatis.generator - mybatis-generator-core - 1.3.5 - compile - true - - - - tk.mybatis - mapper - ${mapper.version} - + + + org.mybatis + mybatis + 3.4.4 + + + org.mybatis + mybatis-spring + 1.3.1 + + + + org.mybatis.generator + mybatis-generator-core + 1.3.5 + compile + true + + + + tk.mybatis + mapper + ${mapper.version} + - - - io.springfox - springfox-swagger2 - 2.7.0 - - - io.springfox - springfox-swagger-ui - 2.7.0 - - - org.springframework.security - spring-security-web - - + + + io.springfox + springfox-swagger2 + 2.7.0 + + + io.springfox + springfox-swagger-ui + 2.7.0 + + + org.springframework.security + spring-security-web + + - - compile - zteits-job - - - org.springframework.boot - spring-boot-maven-plugin - - com.zteits.job.JobApplication - - - + + compile + zteits-job + + + org.springframework.boot + spring-boot-maven-plugin + + com.zteits.job.JobApplication + + + org.apache.maven.plugins maven-compiler-plugin @@ -185,33 +184,33 @@ 1.8 - - - - - - nexus_releases - core Release Repository - http://192.168.1.195:9999/nexus/content/repositories/releases/ - - - nexus_snapshots - core Snapshots Repository - http://192.168.1.195:9999/nexus/content/repositories/snapshots/ - - + + + + + + nexus_releases + core Release Repository + http://192.168.1.195:9999/nexus/content/repositories/releases/ + + + nexus_snapshots + core Snapshots Repository + http://192.168.1.195:9999/nexus/content/repositories/snapshots/ + + diff --git a/zteits-job/src/main/java/com/zteits/job/JobApplication.java b/zteits-job/src/main/java/com/zteits/job/JobApplication.java index 898e4ad..8f98879 100644 --- a/zteits-job/src/main/java/com/zteits/job/JobApplication.java +++ b/zteits-job/src/main/java/com/zteits/job/JobApplication.java @@ -5,9 +5,8 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; -import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.ImportResource; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; @@ -15,9 +14,13 @@ import org.springframework.scheduling.annotation.EnableScheduling; @EnableAsync @MapperScan({"com.zteits.job.mapper"}) @SpringBootApplication(scanBasePackages = {"com.zteits.job","com.clouds.common.redis"}, exclude = {DataSourceAutoConfiguration.class}) -public class JobApplication { - +@EnableAutoConfiguration +public class JobApplication extends SpringBootServletInitializer { + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(JobApplication.class); + } public static void main(String[] args) { SpringApplication.run(JobApplication.class, args); diff --git a/zteits-job/src/main/java/com/zteits/job/config/session/HttpSessionConfig.java b/zteits-job/src/main/java/com/zteits/job/config/session/HttpSessionConfig.java index 3915d4a..8aa67d4 100644 --- a/zteits-job/src/main/java/com/zteits/job/config/session/HttpSessionConfig.java +++ b/zteits-job/src/main/java/com/zteits/job/config/session/HttpSessionConfig.java @@ -1,30 +1,30 @@ -package com.zteits.job.config.session; - -import org.springframework.context.annotation.Bean; -import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; -import org.springframework.session.web.http.HeaderHttpSessionStrategy; -import org.springframework.session.web.http.HttpSessionStrategy; - -/** - * Copyright: Copyright (c) 2017 zteits - * - * @ClassName: com.zteits.oauth.portal.config.session - * @Description: - * @version: v1.0.0 - * @author: atao - * @date: 2017/5/16 下午9:23 - * Modification History: - * Date Author Version Description - * ---------------------------------------------------------* - * 2017/5/16 atao v1.0.0 创建 - */ -//maxInactiveIntervalInSeconds -@EnableRedisHttpSession(maxInactiveIntervalInSeconds=30*24*60*60) -public class HttpSessionConfig { - - @Bean - public HttpSessionStrategy httpSessionStrategy() { - return new HeaderHttpSessionStrategy(); - } - -} +//package com.zteits.job.config.session; +// +//import org.springframework.context.annotation.Bean; +//import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; +//import org.springframework.session.web.http.HeaderHttpSessionStrategy; +//import org.springframework.session.web.http.HttpSessionStrategy; +// +///** +// * Copyright: Copyright (c) 2017 zteits +// * +// * @ClassName: com.zteits.oauth.portal.config.session +// * @Description: +// * @version: v1.0.0 +// * @author: atao +// * @date: 2017/5/16 下午9:23 +// * Modification History: +// * Date Author Version Description +// * ---------------------------------------------------------* +// * 2017/5/16 atao v1.0.0 创建 +// */ +////maxInactiveIntervalInSeconds +//@EnableRedisHttpSession(maxInactiveIntervalInSeconds=30*24*60*60) +//public class HttpSessionConfig { +// +// @Bean +// public HttpSessionStrategy httpSessionStrategy() { +// return new HeaderHttpSessionStrategy(); +// } +// +//} diff --git a/zteits-job/src/main/resources/application-dany.properties b/zteits-job/src/main/resources/application-dany.properties index c296934..bf85ff2 100644 --- a/zteits-job/src/main/resources/application-dany.properties +++ b/zteits-job/src/main/resources/application-dany.properties @@ -1,13 +1,13 @@ server.port=8075 #park-datasource -park-datasource.url=jdbc:mysql://172.19.128.115:3306/zt_park?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true +park-datasource.url=jdbc:mysql://172.19.128.115:3306/zt_park?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true park-datasource.username=park park-datasource.password=MySQL57@123 #order-datasource order-datasource.driverClassName=com.mysql.jdbc.Driver -order-datasource.url=jdbc:mysql://172.19.128.115/zt_order_n?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true +order-datasource.url=jdbc:mysql://172.19.128.115/zt_order_n?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true order-datasource.username=order order-datasource.password=MySQL57@123 diff --git a/zteits-job/src/main/resources/application-prod.properties b/zteits-job/src/main/resources/application-prod.properties index a2a328a..a2f5b8d 100644 --- a/zteits-job/src/main/resources/application-prod.properties +++ b/zteits-job/src/main/resources/application-prod.properties @@ -1,13 +1,13 @@ server.port=8080 #park-datasource -park-datasource.url=jdbc:mysql://192.168.5.224:3306/zt_park?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true +park-datasource.url=jdbc:mysql://192.168.5.224:3306/zt_park?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true park-datasource.username=park park-datasource.password=MySQL5.7;123 #order-datasource order-datasource.driverClassName=com.mysql.jdbc.Driver -order-datasource.url=jdbc:mysql://192.168.5.224:3306/zt_order_n?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true +order-datasource.url=jdbc:mysql://192.168.5.224:3306/zt_order_n?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true order-datasource.username=order order-datasource.password=MySQL5.7;123 diff --git a/zteits-job/src/main/resources/application-www.properties b/zteits-job/src/main/resources/application-www.properties index ae2be3e..e62f75b 100644 --- a/zteits-job/src/main/resources/application-www.properties +++ b/zteits-job/src/main/resources/application-www.properties @@ -9,19 +9,19 @@ logging.file=${spring.application.name}.log #park-datasource park-datasource.driverClassName=com.mysql.jdbc.Driver -park-datasource.url=jdbc:mysql://10.112.92.89:3306/zt_park?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true +park-datasource.url=jdbc:mysql://10.112.92.89:3306/zt_park?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true park-datasource.username=park park-datasource.password=MySQL5.7;123 #order-datasource order-datasource.driverClassName=com.mysql.jdbc.Driver -order-datasource.url=jdbc:mysql://10.112.92.89:3306/zt_order_n?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true +order-datasource.url=jdbc:mysql://10.112.92.89:3306/zt_order_n?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true order-datasource.username=order order-datasource.password=MySQL5.7;123 #sys-datasource sys-datasource.driverClassName=com.mysql.jdbc.Driver -sys-datasource.url=jdbc:mysql://10.112.92.89:3306/zt_sys?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true +sys-datasource.url=jdbc:mysql://10.112.92.89:3306/zt_sys?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true sys-datasource.username=sys sys-datasource.password=MySQL5.7;123 diff --git a/zteits-job/src/main/resources/application.properties b/zteits-job/src/main/resources/application.properties index 8a949b7..1aa0b06 100644 --- a/zteits-job/src/main/resources/application.properties +++ b/zteits-job/src/main/resources/application.properties @@ -11,19 +11,19 @@ logging.file=${spring.application.name}.log #park-datasource park-datasource.driverClassName=com.mysql.jdbc.Driver -park-datasource.url=jdbc:mysql://47.96.41.38:3306/zt_park?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true +park-datasource.url=jdbc:mysql://47.96.41.38:3306/zt_park?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true park-datasource.username=park park-datasource.password=MySQL5.7@123 #order-datasource order-datasource.driverClassName=com.mysql.jdbc.Driver -order-datasource.url=jdbc:mysql://47.96.41.38:3306/zt_order_n?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true +order-datasource.url=jdbc:mysql://47.96.41.38:3306/zt_order_n?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true order-datasource.username=order order-datasource.password=MySQL5.7@123 #sys-datasource sys-datasource.driverClassName=com.mysql.jdbc.Driver -sys-datasource.url=jdbc:mysql://47.96.41.38:3306/zt_sys?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true +sys-datasource.url=jdbc:mysql://47.96.41.38:3306/zt_sys?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true sys-datasource.username=sys sys-datasource.password=MySQL5.7@123 @@ -38,4 +38,13 @@ spring.redis.port=7001 spring.redis.password=myredis spring.redis.database=0 -spring.datasource.initialize=false +spring.session.store-type=redis + + +#spring.boot.admin.client.url=http://192.168.1.196:8080 +spring.boot.admin.client.url=http://localhost:8080 +spring.boot.admin.client.prefer-ip=true +management.endpoints.web.exposure.include=* + +#spring.datasource.initialize=false +spring.datasource.initialization-mode=never