mirror of
https://gitee.com/wangkang/udf.git
synced 2026-10-20 13:43:49 +00:00
更换项目结构
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
########################################################
|
||||
###aliyun dysms (AliyunDysmsProperties)
|
||||
########################################################
|
||||
org.itkk.aliyun.dysms.properties.accessKeyId=
|
||||
org.itkk.aliyun.dysms.properties.accessKeySecret=
|
||||
@@ -0,0 +1,14 @@
|
||||
########################################################
|
||||
###aliyun oss (AliyunOssProperties) (must reboot)
|
||||
########################################################
|
||||
org.itkk.file.aliyun.oss.properties.auth.qa-ew-file.accessId=
|
||||
org.itkk.file.aliyun.oss.properties.auth.qa-ew-file.accessKey=
|
||||
org.itkk.file.aliyun.oss.properties.auth.qa-ew-file.endPoint=
|
||||
org.itkk.file.aliyun.oss.properties.auth.qa-ew-file.expireTime=60
|
||||
#
|
||||
org.itkk.file.aliyun.oss.properties.path.qa-ew-file.bucketName=
|
||||
org.itkk.file.aliyun.oss.properties.path.qa-ew-file.ossHost=
|
||||
org.itkk.file.aliyun.oss.properties.path.qa-ew-file.ossInternalHost=
|
||||
org.itkk.file.aliyun.oss.properties.path.qa-ew-file.cdnHost=
|
||||
#
|
||||
org.itkk.file.aliyun.oss.code=
|
||||
@@ -0,0 +1,24 @@
|
||||
########################################################
|
||||
###SPRING MVC (WebMvcProperties) (must reboot)
|
||||
########################################################
|
||||
spring.mvc.async.request-timeout=-1
|
||||
spring.mandatory-file-encoding=${org.itkk.application.config.encoding}
|
||||
########################################################
|
||||
###JACKSON ( JacksonProperties )
|
||||
########################################################
|
||||
#spring.jackson.dateFormat=${org.itkk.application.config.dateFormat}
|
||||
#spring.jackson.jodaDateTimeFormat=${org.itkk.application.config.dateFormat}
|
||||
spring.jackson.timeZone=${org.itkk.application.config.timeZone}
|
||||
spring.jackson.serialization.INDENT_OUTPUT=true
|
||||
spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false
|
||||
spring.jackson.deserialization.FAIL_ON_UNKNOWN_PROPERTIES=false
|
||||
spring.jackson.parser.ALLOW_SINGLE_QUOTES=true
|
||||
spring.jackson.parser.ALLOW_UNQUOTED_CONTROL_CHARS=true
|
||||
########################################################
|
||||
###\u91CD\u8BD5\u673A\u5236 ( LoadBalancerRetryProperties )
|
||||
########################################################
|
||||
spring.cloud.loadbalancer.retry.enabled=true
|
||||
########################################################
|
||||
###\u7CFB\u7EDF\u57DF\u540D
|
||||
########################################################
|
||||
base.host.name=
|
||||
@@ -0,0 +1,4 @@
|
||||
########################################################
|
||||
###CORS (CorsConfig) (must reboot)
|
||||
########################################################
|
||||
org.itkk.cors.config.demo.mapping=/**
|
||||
@@ -0,0 +1,5 @@
|
||||
########################################################
|
||||
###ExceptionAlertProperties
|
||||
########################################################
|
||||
org.itkk.exception.alert.properties.enable=true
|
||||
org.itkk.exception.alert.properties.excludeType=org.itkk.udf.core.exception.ParameterValidException,org.itkk.udf.core.exception.AuthException,org.springframework.web.bind.MethodArgumentNotValidException,com.ny.ew.zuul.service.store.login.TokenInvalidException,com.ny.ew.zuul.service.company.login.TokenInvalidException,com.ny.ew.zuul.service.weixin.mp.UnBindException,org.itkk.udf.weixin.mp.api.WeixinMpException
|
||||
@@ -0,0 +1,9 @@
|
||||
########################################################
|
||||
###MULTIPART (MultipartProperties)
|
||||
########################################################
|
||||
spring.http.multipart.enabled=true
|
||||
spring.http.multipart.file-size-threshold=0
|
||||
#spring.http.multipart.location=d:/testtesttest/
|
||||
spring.http.multipart.max-file-size=1MB
|
||||
spring.http.multipart.max-request-size=10MB
|
||||
spring.http.multipart.resolve-lazily=false
|
||||
@@ -0,0 +1,7 @@
|
||||
########################################################
|
||||
###FileProperties (FileProperties)
|
||||
########################################################
|
||||
org.itkk.file.properties.rootPath=D:/develop/ew-api-log/
|
||||
org.itkk.file.properties.path.test.owner=ew-general-server
|
||||
org.itkk.file.properties.path.test.path=/file/tttt/
|
||||
org.itkk.file.properties.path.test.description=\u6D4B\u8BD5\u8DEF\u5F84
|
||||
@@ -0,0 +1,5 @@
|
||||
########################################################
|
||||
###GZIP (ServerProperties) (must reboot)
|
||||
########################################################
|
||||
server.compression.enabled=true
|
||||
server.compression.mime-types=text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json
|
||||
@@ -0,0 +1,5 @@
|
||||
########################################################
|
||||
###\u65AD\u8DEF\u5668 (HystrixCommandProperties)
|
||||
########################################################
|
||||
# \u65AD\u8DEF\u5668\u7684\u8D85\u65F6\u65F6\u95F4\u9700\u8981\u5927\u4E8Eribbon\u7684\u8D85\u65F6\u65F6\u95F4\uFF0C\u4E0D\u7136\u4E0D\u4F1A\u89E6\u53D1\u91CD\u8BD5
|
||||
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=10000
|
||||
@@ -0,0 +1,13 @@
|
||||
########################################################
|
||||
###Email (MailProperties)
|
||||
########################################################
|
||||
spring.mail.default-encoding=${org.itkk.application.config.encoding}
|
||||
spring.mail.host=smtp.163.com
|
||||
spring.mail.port=465
|
||||
spring.mail.test-connection=false
|
||||
spring.mail.username=udf_admin@163.com
|
||||
spring.mail.password=123qwe
|
||||
spring.mail.properties.mail.smtp.auth=true
|
||||
spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
|
||||
spring.mail.properties.mail.smtp.starttls.enable=true
|
||||
spring.mail.properties.mail.smtp.starttls.required=true
|
||||
@@ -0,0 +1,4 @@
|
||||
########################################################
|
||||
###MAIL (MailProperties)
|
||||
########################################################
|
||||
org.itkk.mail.properties.from=udf_admin@163.com
|
||||
@@ -0,0 +1,12 @@
|
||||
########################################################
|
||||
###spring.rabbitmq ( RabbitProperties )
|
||||
########################################################
|
||||
spring.rabbitmq.host=itkk.org
|
||||
spring.rabbitmq.port=5672
|
||||
spring.rabbitmq.username=dev_udf_sample_api
|
||||
spring.rabbitmq.password=1qazxsw2
|
||||
spring.rabbitmq.virtual-host=/dev_udf_sample_api
|
||||
spring.rabbitmq.template.retry.enabled=true
|
||||
spring.rabbitmq.listener.simple.retry.enabled=true
|
||||
spring.rabbitmq.listener.simple.concurrency=5
|
||||
spring.rabbitmq.listener.simple.max-concurrency=10
|
||||
@@ -0,0 +1,17 @@
|
||||
########################################################
|
||||
###REDIS (CacheRedisProperties)
|
||||
########################################################
|
||||
org.itkk.cache.redis.properties.prefix=${spring.profiles.active}:${spring.application.name}
|
||||
########################################################
|
||||
###REDIS (RedisProperties)
|
||||
########################################################
|
||||
spring.redis.host=itkk.org
|
||||
spring.redis.port=6379
|
||||
spring.redis.password=1qazxsw2
|
||||
#spring.redis.database=0
|
||||
#spring.redis.pool.max-idle=8
|
||||
#spring.redis.pool.min-idle=0
|
||||
#spring.redis.pool.max-active=8
|
||||
#spring.redis.pool.max-wait=-1
|
||||
#spring.redis.sentinel.master=
|
||||
#spring.redis.sentinel.nodes=
|
||||
@@ -0,0 +1,13 @@
|
||||
########################################################
|
||||
###ribbon ( CommonClientConfigKey , DefaultClientConfigImpl )
|
||||
########################################################
|
||||
# \u8BF7\u6C42\u8FDE\u63A5\u7684\u8D85\u65F6\u65F6\u95F4
|
||||
ribbon.ConnectTimeout=250
|
||||
# \u8BF7\u6C42\u5904\u7406\u7684\u8D85\u65F6\u65F6\u95F4
|
||||
ribbon.ReadTimeout=1000
|
||||
# \u5BF9\u6240\u6709\u64CD\u4F5C\u8BF7\u6C42\u90FD\u8FDB\u884C\u91CD\u8BD5
|
||||
ribbon.OkToRetryOnAllOperations=true
|
||||
# \u5207\u6362\u5B9E\u4F8B\u7684\u91CD\u8BD5\u6B21\u6570
|
||||
ribbon.MaxAutoRetriesNextServer=2
|
||||
# \u5BF9\u5F53\u524D\u5B9E\u4F8B\u7684\u91CD\u8BD5\u6B21\u6570
|
||||
ribbon.MaxAutoRetries=1
|
||||
@@ -0,0 +1,4 @@
|
||||
########################################################
|
||||
###RMS (RmsConfig)
|
||||
########################################################
|
||||
org.itkk.rms.config.rmsPathPatterns=/service/**
|
||||
@@ -0,0 +1,5 @@
|
||||
########################################################
|
||||
###RMS (RmsProperties)
|
||||
########################################################
|
||||
# application
|
||||
# service
|
||||
@@ -0,0 +1,4 @@
|
||||
########################################################
|
||||
###scheduler ( SchedulerConfig )
|
||||
########################################################
|
||||
#org.itkk.scheduler.config.startupDelay=0
|
||||
@@ -0,0 +1,23 @@
|
||||
########################################################
|
||||
###scheduler ( SchedulerProperties )
|
||||
########################################################
|
||||
#jobGroup
|
||||
org.itkk.scheduler.properties.jobGroup.general=\u901A\u7528
|
||||
#triggerGroup
|
||||
org.itkk.scheduler.properties.triggerGroup.general=\u901A\u7528
|
||||
#rmsJob
|
||||
org.itkk.scheduler.properties.jobDetail.rmsJob.name=generalJob
|
||||
org.itkk.scheduler.properties.jobDetail.rmsJob.group=general
|
||||
org.itkk.scheduler.properties.jobDetail.rmsJob.className=org.itkk.udf.scheduler.job.RmsJob
|
||||
org.itkk.scheduler.properties.jobDetail.rmsJob.description=\u901A\u7528\u4F5C\u4E1A
|
||||
org.itkk.scheduler.properties.jobDetail.rmsJob.recovery=false
|
||||
org.itkk.scheduler.properties.jobDetail.rmsJob.durability=true
|
||||
org.itkk.scheduler.properties.jobDetail.rmsJob.autoInit=true
|
||||
#rmsJobDisallowConcurrent
|
||||
org.itkk.scheduler.properties.jobDetail.rmsJobDisallowConcurrent.name=generalJobDisallowConcurrent
|
||||
org.itkk.scheduler.properties.jobDetail.rmsJobDisallowConcurrent.group=general
|
||||
org.itkk.scheduler.properties.jobDetail.rmsJobDisallowConcurrent.className=org.itkk.udf.scheduler.job.RmsJobDisallowConcurrent
|
||||
org.itkk.scheduler.properties.jobDetail.rmsJobDisallowConcurrent.description=\u901A\u7528\u4F5C\u4E1A(\u7981\u6B62\u5E76\u53D1)
|
||||
org.itkk.scheduler.properties.jobDetail.rmsJobDisallowConcurrent.recovery=false
|
||||
org.itkk.scheduler.properties.jobDetail.rmsJobDisallowConcurrent.durability=true
|
||||
org.itkk.scheduler.properties.jobDetail.rmsJobDisallowConcurrent.autoInit=true
|
||||
@@ -0,0 +1,16 @@
|
||||
########################################################
|
||||
###stream ( BindingServiceProperties )
|
||||
########################################################
|
||||
spring.cloud.stream.defaultBinder=defRabbit
|
||||
#
|
||||
spring.cloud.stream.binders.defRabbit.type=rabbit
|
||||
spring.cloud.stream.binders.defRabbit.environment.spring.rabbitmq.host=itkk.org
|
||||
spring.cloud.stream.binders.defRabbit.environment.spring.rabbitmq.port=5672
|
||||
spring.cloud.stream.binders.defRabbit.environment.spring.rabbitmq.username=dev_udf_sample_api
|
||||
spring.cloud.stream.binders.defRabbit.environment.spring.rabbitmq.password=1qazxsw2
|
||||
spring.cloud.stream.binders.defRabbit.environment.spring.rabbitmq.virtual-host=/dev_udf_sample_api
|
||||
spring.cloud.stream.binders.defRabbit.environment.spring.rabbitmq.template.retry.enabled=true
|
||||
spring.cloud.stream.binders.defRabbit.environment.spring.rabbitmq.listener.retry.enabled=true
|
||||
#
|
||||
#spring.cloud.stream.bindings.test.binder=defRabbit
|
||||
#spring.cloud.stream.bindings.test.contentType=application/json
|
||||
@@ -0,0 +1,22 @@
|
||||
########################################################
|
||||
###weixin mp (WeixinMpApiProperties)
|
||||
########################################################
|
||||
org.itkk.weixin.mp.api.properties.auth.customer.appId=
|
||||
org.itkk.weixin.mp.api.properties.auth.customer.appSecret=
|
||||
org.itkk.weixin.mp.api.properties.auth.customer.token=
|
||||
org.itkk.weixin.mp.api.properties.auth.customer.encodingAesKey=
|
||||
org.itkk.weixin.mp.api.properties.auth.customer.safeModel=true
|
||||
#
|
||||
org.itkk.weixin.mp.api.properties.auth.customer.messageTemplateId.purchase_success_notice=
|
||||
org.itkk.weixin.mp.api.properties.auth.customer.messageTemplateId.consumption_notification=
|
||||
org.itkk.weixin.mp.api.properties.auth.customer.messageTemplateId.new_booking_order_notification=
|
||||
#
|
||||
org.itkk.weixin.mp.api.properties.snsPath.sns_oauth2_access_token=https://api.weixin.qq.com/sns/oauth2/access_token
|
||||
org.itkk.weixin.mp.api.properties.snsPath.sns_oauth2_refresh_token=https://api.weixin.qq.com/sns/oauth2/refresh_token
|
||||
org.itkk.weixin.mp.api.properties.snsPath.sns_userinfo=https://api.weixin.qq.com/sns/userinfo
|
||||
org.itkk.weixin.mp.api.properties.snsPath.sns_auth=https://api.weixin.qq.com/sns/auth
|
||||
#
|
||||
org.itkk.weixin.mp.api.properties.apiPath.token=https://api.weixin.qq.com/cgi-bin/token
|
||||
org.itkk.weixin.mp.api.properties.apiPath.menu_create=https://api.weixin.qq.com/cgi-bin/menu/create
|
||||
org.itkk.weixin.mp.api.properties.apiPath.user_info=https://api.weixin.qq.com/cgi-bin/user/info
|
||||
org.itkk.weixin.mp.api.properties.apiPath.message_template_send=https://api.weixin.qq.com/cgi-bin/message/template/send
|
||||
@@ -0,0 +1,272 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<!-- mavne坐标 -->
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-server</artifactId>
|
||||
<name>udf-server</name>
|
||||
<version>1.0</version>
|
||||
<packaging>pom</packaging>
|
||||
<url>http://itkk.org:81</url>
|
||||
<!-- 公共参数 -->
|
||||
<properties>
|
||||
<project.build.date>${maven.build.timestamp}</project.build.date>
|
||||
<udf-starter.version>1.0</udf-starter.version>
|
||||
<ew.version>1.0</ew.version>
|
||||
<springboot.version>1.5.10.RELEASE</springboot.version>
|
||||
<springcloud.version>Edgware.SR3</springcloud.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
|
||||
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
|
||||
<docker-maven-plugin.version>1.0.0</docker-maven-plugin.version>
|
||||
<docker.java.base.image>192.168.1.10:5000/org.itkk/java:8</docker.java.base.image>
|
||||
<docker.registry.host>192.168.1.10:5000</docker.registry.host>
|
||||
<docker.maintainer>wangkangit@163.com</docker.maintainer>
|
||||
<spring-boot-admin.version>1.5.6</spring-boot-admin.version>
|
||||
</properties>
|
||||
<!--子模块 -->
|
||||
<modules>
|
||||
<module>udf-eureka-config-server</module>
|
||||
</modules>
|
||||
<!-- 环境 -->
|
||||
<profiles>
|
||||
<!-- 开发 -->
|
||||
<profile>
|
||||
<id>dev</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<properties>
|
||||
<profiles.activation>dev</profiles.activation>
|
||||
</properties>
|
||||
</profile>
|
||||
<!-- qa -->
|
||||
<profile>
|
||||
<id>qa</id>
|
||||
<properties>
|
||||
<profiles.activation>qa</profiles.activation>
|
||||
</properties>
|
||||
</profile>
|
||||
<!-- pe -->
|
||||
<profile>
|
||||
<id>pe</id>
|
||||
<properties>
|
||||
<profiles.activation>pe</profiles.activation>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
<!-- 依赖管理 -->
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- spring boot -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${springboot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<!-- spring cloud -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>${springcloud.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<!-- udf-starter-core -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-core</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-exception-alert -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-exception-alert</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-swagger2 -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-swagger2</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-rms -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-rms</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-cors -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-cors</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-amqp-rabbitmq -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-amqp-rabbitmq</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-file-aliyun-oss-api -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-file-aliyun-oss-api</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-file-aliyun-oss -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-file-aliyun-oss</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-aliyun-dysms -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-aliyun-dysms</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-aliyun-dysms-api -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-aliyun-dysms-api</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- udf-starter-file -->
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-file</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
-->
|
||||
<!-- udf-starter-mail -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-mail</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-scheduler -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-scheduler</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-scheduler-client -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-scheduler-client</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-id -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-id</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-datasource -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-datasource</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-connection-pool-druid -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-connection-pool-druid</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-qrcode -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-qrcode</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-auth -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-auth</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-dal-mybatis -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-dal-mybatis</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-cache-redis -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-cache-redis</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<!-- 构建 -->
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>${maven-source-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<!-- 分发管理 -->
|
||||
<distributionManagement>
|
||||
<!-- 公司内网仓库-snapshot -->
|
||||
<!-- <snapshotRepository> <id>snapshot</id> <url>http://192.168.1.11:8081/nexus/content/repositories/snapshots/</url>
|
||||
</snapshotRepository> -->
|
||||
<!-- 公司内网仓库-release -->
|
||||
<!-- <repository> <id>release</id> <url>http://192.168.1.11:8081/nexus/content/repositories/releases/</url> </repository> -->
|
||||
</distributionManagement>
|
||||
<!-- 依赖仓库 -->
|
||||
<repositories>
|
||||
<!-- 指定中央仓库(id为central,覆盖默认的中央库设置) -->
|
||||
<repository>
|
||||
<id>central</id>
|
||||
<name>Nexus aliyun</name>
|
||||
<layout>default</layout>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<!-- 插件仓库 -->
|
||||
<pluginRepositories>
|
||||
<!-- 指定中央仓库(id为central,覆盖默认的中央库设置) -->
|
||||
<pluginRepository>
|
||||
<id>central</id>
|
||||
<name>Nexus aliyun</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<layout>default</layout>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</project>
|
||||
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<!-- maven坐标 -->
|
||||
<artifactId>udf-eureka-config-server</artifactId>
|
||||
<name>udf-eureka-config-server</name>
|
||||
<packaging>jar</packaging>
|
||||
<url>http://itkk.org:81</url>
|
||||
<!-- 父依赖 -->
|
||||
<parent>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-server</artifactId>
|
||||
<version>1.0</version>
|
||||
</parent>
|
||||
<!-- 参数 -->
|
||||
<properties>
|
||||
<server.port>9001</server.port>
|
||||
<management.port>8001</management.port>
|
||||
</properties>
|
||||
<!-- 依赖 -->
|
||||
<dependencies>
|
||||
<!-- spring-boot-starter-security -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
<!-- spring cloud starter eureka server -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
|
||||
</dependency>
|
||||
<!-- spring-cloud-config-server 配置服务器 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-config-server</artifactId>
|
||||
</dependency>
|
||||
<!-- spring-boot-devtools -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- udf-starter-core -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-core</artifactId>
|
||||
</dependency>
|
||||
<!-- udf-starter-exception-alert -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-exception-alert</artifactId>
|
||||
</dependency>
|
||||
<!-- udf-starter-amqp-rabbitmq -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-amqp-rabbitmq</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<!-- 构建 -->
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.basedir}/src/main/resources/</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<!-- package -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${springboot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- docker -->
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${docker-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<imageName>${docker.registry.host}/${project.groupId}/${project.artifactId}:latest</imageName>
|
||||
<baseImage>${docker.java.base.image}</baseImage>
|
||||
<maintainer>${docker.maintainer}</maintainer>
|
||||
<exposes>${server.port}</exposes>
|
||||
<cmd></cmd>
|
||||
<entryPoint>["java","-jar","/${project.build.finalName}.jar"]</entryPoint>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package org.itkk.udf.eureka.config.server;
|
||||
|
||||
import org.itkk.udf.core.BaseApplication;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.cloud.client.SpringCloudApplication;
|
||||
import org.springframework.cloud.config.server.EnableConfigServer;
|
||||
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
|
||||
|
||||
/**
|
||||
* 描述 : 系统入口
|
||||
*
|
||||
* @author wangkang
|
||||
*/
|
||||
@SpringCloudApplication
|
||||
@EnableEurekaServer
|
||||
@EnableConfigServer
|
||||
public class UdfEurekaConfigServerApplication extends BaseApplication {
|
||||
|
||||
/**
|
||||
* 描述 : spring boot的入口,在整个项目中,包括其子项目在内, 只能有一个main方法,否则spring boot启动不起来
|
||||
*
|
||||
* @param args 参数
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(UdfEurekaConfigServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
########################################################
|
||||
###security (must reboot)
|
||||
########################################################
|
||||
security.user.name=admin
|
||||
security.user.password=123456
|
||||
########################################################
|
||||
###eureka.instance ( EurekaInstanceConfigBean ) (must reboot)
|
||||
########################################################
|
||||
eureka.instance.preferIpAddress=true
|
||||
########################################################
|
||||
###eureka.client (EurekaClientConfigBean , EurekaServerConfigBean ) (must reboot)
|
||||
########################################################
|
||||
eureka.client.enabled=true
|
||||
eureka.client.serviceUrl.defaultZone=http://admin:123456@127.0.0.1:${server.port}/eureka/
|
||||
eureka.client.register-with-eureka=true
|
||||
eureka.client.fetch-registry=true
|
||||
########################################################
|
||||
###spring.cloud.config.server ( ConfigServerProperties )
|
||||
########################################################
|
||||
spring.cloud.config.server.prefix=config-server
|
||||
########################################################
|
||||
###spring.cloud.config.server.git ( MultipleJGitEnvironmentRepository ) ({application}/{profile}/{label})
|
||||
########################################################
|
||||
spring.cloud.config.server.git.uri=https://gitee.com/wangkang/udf.git
|
||||
spring.cloud.config.server.git.searchPaths=udf-config-repository/{application}
|
||||
spring.cloud.config.server.git.defaultLabel=master
|
||||
spring.cloud.config.server.git.forcePull=true
|
||||
spring.cloud.config.server.git.username=udf_admin@163.com
|
||||
spring.cloud.config.server.git.password=123456!@#$%^
|
||||
########################################################
|
||||
###spring.rabbitmq ( RabbitProperties )
|
||||
########################################################
|
||||
spring.rabbitmq.host=itkk.org
|
||||
spring.rabbitmq.port=5672
|
||||
spring.rabbitmq.username=dev_udf_sample_api
|
||||
spring.rabbitmq.password=1qazxsw2
|
||||
spring.rabbitmq.virtual-host=/dev_udf_sample_api
|
||||
spring.rabbitmq.template.retry.enabled=true
|
||||
########################################################
|
||||
###org.itkk.application.config (ApplicationConfig)
|
||||
########################################################
|
||||
org.itkk.application.config.outputExceptionStackTrace=true
|
||||
org.itkk.application.config.threadPool.poolSize=100
|
||||
########################################################
|
||||
###LOGGING (must reboot)
|
||||
########################################################
|
||||
logging.file=d:/develop/${project.groupId}-log/${spring.application.name}_${server.port}_${spring.profiles.active}/base.log
|
||||
########################################################
|
||||
###GZIP (ServerProperties) ((must reboot)
|
||||
########################################################
|
||||
server.compression.enabled=true
|
||||
server.compression.mime-types=text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json
|
||||
########################################################
|
||||
###SPRING MVC (WebMvcProperties) (must reboot)
|
||||
########################################################
|
||||
spring.mvc.async.request-timeout=-1
|
||||
spring.mandatory-file-encoding=${org.itkk.application.config.encoding}
|
||||
########################################################
|
||||
###JACKSON ( JacksonProperties )
|
||||
########################################################
|
||||
#spring.jackson.dateFormat=${org.itkk.application.config.dateFormat}
|
||||
#spring.jackson.jodaDateTimeFormat=${org.itkk.application.config.dateFormat}
|
||||
spring.jackson.timeZone=${org.itkk.application.config.timeZone}
|
||||
spring.jackson.serialization.INDENT_OUTPUT=true
|
||||
spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=true
|
||||
spring.jackson.deserialization.FAIL_ON_UNKNOWN_PROPERTIES=true
|
||||
spring.jackson.parser.ALLOW_SINGLE_QUOTES=true
|
||||
spring.jackson.parser.ALLOW_UNQUOTED_CONTROL_CHARS=true
|
||||
@@ -0,0 +1,40 @@
|
||||
########################################################
|
||||
###INFO ( note : info.build.time is the UTC time )
|
||||
########################################################
|
||||
info.build.group=${project.groupId}
|
||||
info.build.artifact=${project.artifactId}
|
||||
info.build.version=${project.version}
|
||||
info.build.name=${project.name}
|
||||
info.build.time=${project.build.date}
|
||||
info.build.encoding=${project.build.sourceEncoding}
|
||||
info.build.java.source=${java.version}
|
||||
info.build.java.target=${java.version}
|
||||
########################################################
|
||||
###IDENTITY
|
||||
########################################################
|
||||
spring.application.name=${project.name}
|
||||
########################################################
|
||||
###WEB PROPERTIES (ServerProperties)
|
||||
########################################################
|
||||
server.port=${server.port}
|
||||
########################################################
|
||||
###MANAGEMENT (ManagementServerProperties)
|
||||
########################################################
|
||||
management.security.enabled=false
|
||||
########################################################
|
||||
###PROFILES
|
||||
########################################################
|
||||
spring.profiles.active=${profiles.activation}
|
||||
########################################################
|
||||
###org.itkk.application.config (ApplicationConfig) (must reboot)
|
||||
########################################################
|
||||
org.itkk.application.config.encoding=UTF-8
|
||||
org.itkk.application.config.timeZone=Asia/Shanghai
|
||||
org.itkk.application.config.dateFormat=yyyy-MM-dd'T'HH:mm:ss:SSSZ
|
||||
########################################################
|
||||
### shutdown
|
||||
########################################################
|
||||
endpoints.shutdown.enabled=true
|
||||
endpoints.shutdown.sensitive=true
|
||||
management.port=${management.port}
|
||||
management.address=127.0.0.1
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
base_path="udf-sample-api"
|
||||
|
||||
echo 'shutdown application begin'
|
||||
returnCode=`curl -I -s -X POST "http://127.0.0.1:${management.port}/shutdown"|head -1|cut -d" " -f2`
|
||||
echo "shutdown status code : $returnCode"
|
||||
sleep 5
|
||||
echo 'shutdown application end'
|
||||
|
||||
echo 'stop application begin'
|
||||
PID=$(ps -ef | grep ${project.name}-${project.version}.jar | grep -v grep | awk '{ print $2 }')
|
||||
if [ -z "$PID" ]
|
||||
then
|
||||
echo 'application is already stopped'
|
||||
else
|
||||
echo kill $PID
|
||||
kill -9 $PID
|
||||
fi
|
||||
rm -rf /${base_path}/${project.name}-${project.version}.jar
|
||||
echo 'stop application end'
|
||||
|
||||
echo 'clean copy application begin'
|
||||
rm -rf /${base_path}/${project.name}-${project.version}.jar
|
||||
cp ../${project.name}-${project.version}.jar /${base_path}/${project.name}-${project.version}.jar
|
||||
echo 'copy application end'
|
||||
|
||||
echo 'start application begin'
|
||||
nohup java -server -Xms256m -Xmx256m -XX:+UseG1GC -jar /${base_path}/${project.name}-${project.version}.jar --spring.profiles.active=qa &
|
||||
echo 'start application end'
|
||||
|
||||
echo 'sleep 60ms begin'
|
||||
sleep 60
|
||||
echo 'sleep 60ms end'
|
||||
|
||||
echo 'check service begin'
|
||||
returnCode=`curl -I -s "http://127.0.0.1:${management.port}/info"|head -1|cut -d" " -f2`
|
||||
if [ "$returnCode" == "200" ]
|
||||
then
|
||||
echo "service has started";
|
||||
else
|
||||
echo "service has error or start time out of 60ms";
|
||||
exit 1;
|
||||
fi
|
||||
echo 'check service end'
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml" />
|
||||
<jmxConfigurator />
|
||||
</configuration>
|
||||
BIN
Binary file not shown.
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="true">
|
||||
<fileset name="all" enabled="true" check-config-name="itkk.org" local="false">
|
||||
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||
</fileset>
|
||||
</fileset-config>
|
||||
@@ -1,4 +0,0 @@
|
||||
/target/
|
||||
/bin/
|
||||
/.classpath
|
||||
/.project
|
||||
+320
-320
@@ -1,320 +1,320 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<!-- mavne坐标 -->
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter</artifactId>
|
||||
<version>1.0</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>udf-starter</name>
|
||||
<url>http://itkk.org:81</url>
|
||||
<!-- 公共参数 -->
|
||||
<properties>
|
||||
<udf-starter.version>1.0</udf-starter.version>
|
||||
<springboot.version>1.5.10.RELEASE</springboot.version>
|
||||
<springcloud.version>Edgware.SR3</springcloud.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
|
||||
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
|
||||
<springfox-swagger2.version>2.8.0</springfox-swagger2.version>
|
||||
<commons-collections4.version>4.1</commons-collections4.version>
|
||||
<commons-lang3.version>3.7</commons-lang3.version>
|
||||
<commons-compress.version>1.15</commons-compress.version>
|
||||
<quartz.version>2.3.0</quartz.version>
|
||||
<alibaba.druid.version>1.1.6</alibaba.druid.version>
|
||||
<jasypt-spring-boot-starter.version>1.17</jasypt-spring-boot-starter.version>
|
||||
<zxing.version>3.3.1</zxing.version>
|
||||
<mybatis-spring-boot-starter.version>1.3.1</mybatis-spring-boot-starter.version>
|
||||
<jsqlparser.version>1.1</jsqlparser.version>
|
||||
<aliyun-sdk-oss.version>2.8.2</aliyun-sdk-oss.version>
|
||||
<aliyun-java-sdk-dysmsapi.version>1.0.0</aliyun-java-sdk-dysmsapi.version>
|
||||
<aliyun-java-sdk-core.version>3.5.0</aliyun-java-sdk-core.version>
|
||||
<poi.version>3.17</poi.version>
|
||||
<aes.version>1.0</aes.version>
|
||||
</properties>
|
||||
<!--子模块 -->
|
||||
<modules>
|
||||
<module>udf-starter-core</module>
|
||||
<module>udf-starter-exception-alert</module>
|
||||
<module>udf-starter-swagger2</module>
|
||||
<module>udf-starter-rms</module>
|
||||
<module>udf-starter-cors</module>
|
||||
<module>udf-starter-amqp-rabbitmq</module>
|
||||
<module>udf-starter-file</module>
|
||||
<module>udf-starter-file-aliyun-oss</module>
|
||||
<module>udf-starter-file-aliyun-oss-api</module>
|
||||
<module>udf-starter-aliyun-dysms</module>
|
||||
<module>udf-starter-aliyun-dysms-api</module>
|
||||
<module>udf-starter-mail</module>
|
||||
<module>udf-starter-scheduler</module>
|
||||
<module>udf-starter-scheduler-client</module>
|
||||
<module>udf-starter-id</module>
|
||||
<module>udf-starter-datasource</module>
|
||||
<module>udf-starter-connection-pool-druid</module>
|
||||
<module>udf-starter-qrcode</module>
|
||||
<module>udf-starter-auth</module>
|
||||
<module>udf-starter-datasource-dynamic</module>
|
||||
<module>udf-starter-dal-mybatis</module>
|
||||
<module>udf-starter-cache-redis</module>
|
||||
<module>udf-starter-weixin-mp</module>
|
||||
<module>udf-starter-weixin-mp-api</module>
|
||||
</modules>
|
||||
<!-- 依赖管理 -->
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- spring boot -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${springboot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<!-- spring cloud -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>${springcloud.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<!-- udf-starter-core -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-core</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-exception-alert -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-exception-alert</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-swagger2 -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-swagger2</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-rms -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-rms</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-cors -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-cors</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-amqp-rabbitmq -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-amqp-rabbitmq</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-file -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-file</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-file-aliyun-oss -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-file-aliyun-oss</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-file-aliyun-oss-api -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-file-aliyun-oss-api</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-aliyun-dysms -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-aliyun-dysms</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-aliyun-dysms-api -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-aliyun-dysms-api</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-mail -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-mail</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-scheduler -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-scheduler</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-scheduler-client -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-scheduler-client</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-id -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-id</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-datasource -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-datasource</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-datasource-dynamic -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-datasource-dynamic</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-connection-pool-druid -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-connection-pool-druid</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-qrcode -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-qrcode</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-auth -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-auth</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-dal-mybatis -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-dal-mybatis</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-cache-redis -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-cache-redis</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-weixin-mp-api -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-weixin-mp-api</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-weixin-mp -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-weixin-mp</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<!-- 构建 -->
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>${maven-source-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<!-- 分发管理 -->
|
||||
<distributionManagement>
|
||||
<!-- 公司内网仓库-snapshot -->
|
||||
<!-- <snapshotRepository> <id>snapshot</id> <url>http://192.168.1.11:8081/nexus/content/repositories/snapshots/</url>
|
||||
</snapshotRepository> -->
|
||||
<!-- 公司内网仓库-release -->
|
||||
<!-- <repository> <id>release</id> <url>http://192.168.1.11:8081/nexus/content/repositories/releases/</url> </repository> -->
|
||||
</distributionManagement>
|
||||
<!-- 依赖仓库 -->
|
||||
<repositories>
|
||||
<!-- 指定中央仓库(id为central,覆盖默认的中央库设置) -->
|
||||
<repository>
|
||||
<id>central</id>
|
||||
<name>Nexus aliyun</name>
|
||||
<layout>default</layout>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>maven</id>
|
||||
<name>maven</name>
|
||||
<url>http://repo1.maven.org/maven2/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<!-- 指定公司内网仓库 -->
|
||||
<!-- <repository> <id>egridcloud-nexus</id> <name>Nexus egridcloud</name> <layout>default</layout> <url>http://192.168.1.11:8081/nexus/content/groups/public/</url>
|
||||
</repository> -->
|
||||
</repositories>
|
||||
<!-- 插件仓库 -->
|
||||
<pluginRepositories>
|
||||
<!-- 指定中央仓库(id为central,覆盖默认的中央库设置) -->
|
||||
<pluginRepository>
|
||||
<id>central</id>
|
||||
<name>Nexus aliyun</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<layout>default</layout>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>maven</id>
|
||||
<name>maven</name>
|
||||
<url>http://repo1.maven.org/maven2/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
<!-- 指定公司内网仓库 -->
|
||||
<!-- <pluginRepository> <id>egridcloud-nexus</id> <name>Nexus egridcloud</name> <url>http://192.168.1.11:8081/nexus/content/groups/public/</url>
|
||||
<layout>default</layout> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots>
|
||||
</pluginRepository> -->
|
||||
</pluginRepositories>
|
||||
</project>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<!-- mavne坐标 -->
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter</artifactId>
|
||||
<name>udf-starter</name>
|
||||
<version>1.0</version>
|
||||
<packaging>pom</packaging>
|
||||
<url>http://itkk.org:81</url>
|
||||
<!-- 公共参数 -->
|
||||
<properties>
|
||||
<udf-starter.version>1.0</udf-starter.version>
|
||||
<springboot.version>1.5.10.RELEASE</springboot.version>
|
||||
<springcloud.version>Edgware.SR3</springcloud.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
|
||||
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
|
||||
<springfox-swagger2.version>2.8.0</springfox-swagger2.version>
|
||||
<commons-collections4.version>4.1</commons-collections4.version>
|
||||
<commons-lang3.version>3.7</commons-lang3.version>
|
||||
<commons-compress.version>1.15</commons-compress.version>
|
||||
<quartz.version>2.3.0</quartz.version>
|
||||
<alibaba.druid.version>1.1.6</alibaba.druid.version>
|
||||
<jasypt-spring-boot-starter.version>1.17</jasypt-spring-boot-starter.version>
|
||||
<zxing.version>3.3.1</zxing.version>
|
||||
<mybatis-spring-boot-starter.version>1.3.1</mybatis-spring-boot-starter.version>
|
||||
<jsqlparser.version>1.1</jsqlparser.version>
|
||||
<aliyun-sdk-oss.version>2.8.2</aliyun-sdk-oss.version>
|
||||
<aliyun-java-sdk-dysmsapi.version>1.0.0</aliyun-java-sdk-dysmsapi.version>
|
||||
<aliyun-java-sdk-core.version>3.5.0</aliyun-java-sdk-core.version>
|
||||
<poi.version>3.17</poi.version>
|
||||
<aes.version>1.0</aes.version>
|
||||
</properties>
|
||||
<!--子模块 -->
|
||||
<modules>
|
||||
<module>udf-starter-core</module>
|
||||
<module>udf-starter-exception-alert</module>
|
||||
<module>udf-starter-swagger2</module>
|
||||
<module>udf-starter-rms</module>
|
||||
<module>udf-starter-cors</module>
|
||||
<module>udf-starter-amqp-rabbitmq</module>
|
||||
<module>udf-starter-file</module>
|
||||
<module>udf-starter-file-aliyun-oss</module>
|
||||
<module>udf-starter-file-aliyun-oss-api</module>
|
||||
<module>udf-starter-aliyun-dysms</module>
|
||||
<module>udf-starter-aliyun-dysms-api</module>
|
||||
<module>udf-starter-mail</module>
|
||||
<module>udf-starter-scheduler</module>
|
||||
<module>udf-starter-scheduler-client</module>
|
||||
<module>udf-starter-id</module>
|
||||
<module>udf-starter-datasource</module>
|
||||
<module>udf-starter-connection-pool-druid</module>
|
||||
<module>udf-starter-qrcode</module>
|
||||
<module>udf-starter-auth</module>
|
||||
<module>udf-starter-datasource-dynamic</module>
|
||||
<module>udf-starter-dal-mybatis</module>
|
||||
<module>udf-starter-cache-redis</module>
|
||||
<module>udf-starter-weixin-mp</module>
|
||||
<module>udf-starter-weixin-mp-api</module>
|
||||
</modules>
|
||||
<!-- 依赖管理 -->
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- spring boot -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${springboot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<!-- spring cloud -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>${springcloud.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<!-- udf-starter-core -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-core</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-exception-alert -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-exception-alert</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-swagger2 -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-swagger2</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-rms -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-rms</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-cors -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-cors</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-amqp-rabbitmq -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-amqp-rabbitmq</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-file -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-file</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-file-aliyun-oss -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-file-aliyun-oss</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-file-aliyun-oss-api -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-file-aliyun-oss-api</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-aliyun-dysms -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-aliyun-dysms</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-aliyun-dysms-api -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-aliyun-dysms-api</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-mail -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-mail</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-scheduler -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-scheduler</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-scheduler-client -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-scheduler-client</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-id -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-id</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-datasource -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-datasource</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-datasource-dynamic -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-datasource-dynamic</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-connection-pool-druid -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-connection-pool-druid</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-qrcode -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-qrcode</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-auth -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-auth</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-dal-mybatis -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-dal-mybatis</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-cache-redis -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-cache-redis</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-weixin-mp-api -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-weixin-mp-api</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- udf-starter-weixin-mp -->
|
||||
<dependency>
|
||||
<groupId>org.itkk.udf</groupId>
|
||||
<artifactId>udf-starter-weixin-mp</artifactId>
|
||||
<version>${udf-starter.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<!-- 构建 -->
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>${maven-source-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<!-- 分发管理 -->
|
||||
<distributionManagement>
|
||||
<!-- 公司内网仓库-snapshot -->
|
||||
<!-- <snapshotRepository> <id>snapshot</id> <url>http://192.168.1.11:8081/nexus/content/repositories/snapshots/</url>
|
||||
</snapshotRepository> -->
|
||||
<!-- 公司内网仓库-release -->
|
||||
<!-- <repository> <id>release</id> <url>http://192.168.1.11:8081/nexus/content/repositories/releases/</url> </repository> -->
|
||||
</distributionManagement>
|
||||
<!-- 依赖仓库 -->
|
||||
<repositories>
|
||||
<!-- 指定中央仓库(id为central,覆盖默认的中央库设置) -->
|
||||
<repository>
|
||||
<id>central</id>
|
||||
<name>Nexus aliyun</name>
|
||||
<layout>default</layout>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>maven</id>
|
||||
<name>maven</name>
|
||||
<url>http://repo1.maven.org/maven2/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<!-- 指定公司内网仓库 -->
|
||||
<!-- <repository> <id>egridcloud-nexus</id> <name>Nexus egridcloud</name> <layout>default</layout> <url>http://192.168.1.11:8081/nexus/content/groups/public/</url>
|
||||
</repository> -->
|
||||
</repositories>
|
||||
<!-- 插件仓库 -->
|
||||
<pluginRepositories>
|
||||
<!-- 指定中央仓库(id为central,覆盖默认的中央库设置) -->
|
||||
<pluginRepository>
|
||||
<id>central</id>
|
||||
<name>Nexus aliyun</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<layout>default</layout>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>maven</id>
|
||||
<name>maven</name>
|
||||
<url>http://repo1.maven.org/maven2/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
<!-- 指定公司内网仓库 -->
|
||||
<!-- <pluginRepository> <id>egridcloud-nexus</id> <name>Nexus egridcloud</name> <url>http://192.168.1.11:8081/nexus/content/groups/public/</url>
|
||||
<layout>default</layout> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots>
|
||||
</pluginRepository> -->
|
||||
</pluginRepositories>
|
||||
</project>
|
||||
+70
-70
@@ -1,70 +1,70 @@
|
||||
/**
|
||||
* RabbitMqConfig.java
|
||||
* Created at 2016-10-16
|
||||
* Created by wangkang
|
||||
* Copyright (C) 2016 itkk.org, All rights reserved.
|
||||
*/
|
||||
package org.itkk.udf.amqp.rabbitmq;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.amqp.core.DirectExchange;
|
||||
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
|
||||
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 描述 : RabbitMq配置
|
||||
*
|
||||
* @author wangkang
|
||||
*/
|
||||
@Configuration
|
||||
public class RabbitMqConfig {
|
||||
|
||||
/**
|
||||
* 描述 : rabbitListenerContainerFactoryPlus
|
||||
*
|
||||
* @param rabbitListenerContainerFactory rabbitListenerContainerFactory
|
||||
* @param jackson2JsonMessageConverter jackson2JsonMessageConverter
|
||||
* @return rabbitListenerContainerFactoryPlus
|
||||
*/
|
||||
@Bean
|
||||
public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactoryPlus(
|
||||
SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory,
|
||||
Jackson2JsonMessageConverter jackson2JsonMessageConverter) {
|
||||
rabbitListenerContainerFactory.setMessageConverter(jackson2JsonMessageConverter);
|
||||
return rabbitListenerContainerFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : jackson2JsonMessageConverter
|
||||
*
|
||||
* @param objectMapper objectMapper
|
||||
* @return jackson2JsonMessageConverter
|
||||
*/
|
||||
@Bean
|
||||
public Jackson2JsonMessageConverter jackson2JsonMessageConverter(ObjectMapper objectMapper) {
|
||||
return new Jackson2JsonMessageConverter(objectMapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* exchangeMessageLog
|
||||
*
|
||||
* @return DirectExchange
|
||||
*/
|
||||
@Bean
|
||||
public DirectExchange exchangeMessageLog() {
|
||||
return new DirectExchange(RabbitmqConstant.EXCHANGE_MESSAGE_LOG.class.getSimpleName(), true, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* exchangeMessageLogDlx
|
||||
*
|
||||
* @return DirectExchange
|
||||
*/
|
||||
@Bean
|
||||
public DirectExchange exchangeMessageLogDlx() {
|
||||
return new DirectExchange(RabbitmqConstant.EXCHANGE_MESSAGE_LOG_DLX.class.getSimpleName(), true, false);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* RabbitMqConfig.java
|
||||
* Created at 2016-10-16
|
||||
* Created by wangkang
|
||||
* Copyright (C) 2016 itkk.org, All rights reserved.
|
||||
*/
|
||||
package org.itkk.udf.amqp.rabbitmq;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.amqp.core.DirectExchange;
|
||||
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
|
||||
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 描述 : RabbitMq配置
|
||||
*
|
||||
* @author wangkang
|
||||
*/
|
||||
@Configuration
|
||||
public class RabbitMqConfig {
|
||||
|
||||
/**
|
||||
* 描述 : rabbitListenerContainerFactoryPlus
|
||||
*
|
||||
* @param rabbitListenerContainerFactory rabbitListenerContainerFactory
|
||||
* @param jackson2JsonMessageConverter jackson2JsonMessageConverter
|
||||
* @return rabbitListenerContainerFactoryPlus
|
||||
*/
|
||||
@Bean
|
||||
public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactoryPlus(
|
||||
SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory,
|
||||
Jackson2JsonMessageConverter jackson2JsonMessageConverter) {
|
||||
rabbitListenerContainerFactory.setMessageConverter(jackson2JsonMessageConverter);
|
||||
return rabbitListenerContainerFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : jackson2JsonMessageConverter
|
||||
*
|
||||
* @param objectMapper objectMapper
|
||||
* @return jackson2JsonMessageConverter
|
||||
*/
|
||||
@Bean
|
||||
public Jackson2JsonMessageConverter jackson2JsonMessageConverter(ObjectMapper objectMapper) {
|
||||
return new Jackson2JsonMessageConverter(objectMapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* exchangeMessageLog
|
||||
*
|
||||
* @return DirectExchange
|
||||
*/
|
||||
@Bean
|
||||
public DirectExchange exchangeMessageLog() {
|
||||
return new DirectExchange(RabbitmqConstant.EXCHANGE_MESSAGE_LOG.class.getSimpleName(), true, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* exchangeMessageLogDlx
|
||||
*
|
||||
* @return DirectExchange
|
||||
*/
|
||||
@Bean
|
||||
public DirectExchange exchangeMessageLogDlx() {
|
||||
return new DirectExchange(RabbitmqConstant.EXCHANGE_MESSAGE_LOG_DLX.class.getSimpleName(), true, false);
|
||||
}
|
||||
|
||||
}
|
||||
+81
-81
@@ -1,81 +1,81 @@
|
||||
package org.itkk.udf.core;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 描述 : 系统配置
|
||||
*
|
||||
* @author wangkang
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "org.itkk.application.config")
|
||||
@Validated
|
||||
@Data
|
||||
public class ApplicationConfig {
|
||||
|
||||
/**
|
||||
* 描述 : 是否输出异常堆栈
|
||||
*/
|
||||
@NotNull
|
||||
private boolean outputExceptionStackTrace = false;
|
||||
|
||||
/**
|
||||
* 描述 : 编码
|
||||
*/
|
||||
@NotNull
|
||||
private String encoding = "UTF-8";
|
||||
|
||||
/**
|
||||
* 描述 : 时区
|
||||
*/
|
||||
@NotNull
|
||||
private String timeZone = "Asia/Shanghai";
|
||||
|
||||
/**
|
||||
* 描述 : 日期格式
|
||||
*/
|
||||
@NotNull
|
||||
private String dateFormat = "yyyy-MM-dd'T'HH:mm:ss:SSSZ";
|
||||
|
||||
/**
|
||||
* 描述 : 线程池属性
|
||||
*/
|
||||
private ThreadPoolProperties threadPool;
|
||||
|
||||
/**
|
||||
* 描述 : 如有大文件通过restTemplate传输,请设置为false
|
||||
*/
|
||||
@NotNull
|
||||
private Boolean bufferRequestBody = true;
|
||||
|
||||
/**
|
||||
* 描述 : 线程池配置
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
@Data
|
||||
public static class ThreadPoolProperties {
|
||||
|
||||
/**
|
||||
* 描述 : 默认线程池大小(默认:CPU数量+1)
|
||||
*/
|
||||
private Integer poolSize = Runtime.getRuntime().availableProcessors() + 1;
|
||||
|
||||
/**
|
||||
* 描述 : 线程优先级
|
||||
*/
|
||||
private Integer threadPriority = Thread.NORM_PRIORITY;
|
||||
|
||||
/**
|
||||
* 描述 : 线程名称
|
||||
*/
|
||||
private String threadNamePrefix = "defaultThreadPool";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
package org.itkk.udf.core;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 描述 : 系统配置
|
||||
*
|
||||
* @author wangkang
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "org.itkk.application.config")
|
||||
@Validated
|
||||
@Data
|
||||
public class ApplicationConfig {
|
||||
|
||||
/**
|
||||
* 描述 : 是否输出异常堆栈
|
||||
*/
|
||||
@NotNull
|
||||
private boolean outputExceptionStackTrace = false;
|
||||
|
||||
/**
|
||||
* 描述 : 编码
|
||||
*/
|
||||
@NotNull
|
||||
private String encoding = "UTF-8";
|
||||
|
||||
/**
|
||||
* 描述 : 时区
|
||||
*/
|
||||
@NotNull
|
||||
private String timeZone = "Asia/Shanghai";
|
||||
|
||||
/**
|
||||
* 描述 : 日期格式
|
||||
*/
|
||||
@NotNull
|
||||
private String dateFormat = "yyyy-MM-dd'T'HH:mm:ss:SSSZ";
|
||||
|
||||
/**
|
||||
* 描述 : 线程池属性
|
||||
*/
|
||||
private ThreadPoolProperties threadPool;
|
||||
|
||||
/**
|
||||
* 描述 : 如有大文件通过restTemplate传输,请设置为false
|
||||
*/
|
||||
@NotNull
|
||||
private Boolean bufferRequestBody = true;
|
||||
|
||||
/**
|
||||
* 描述 : 线程池配置
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
@Data
|
||||
public static class ThreadPoolProperties {
|
||||
|
||||
/**
|
||||
* 描述 : 默认线程池大小(默认:CPU数量+1)
|
||||
*/
|
||||
private Integer poolSize = Runtime.getRuntime().availableProcessors() + 1;
|
||||
|
||||
/**
|
||||
* 描述 : 线程优先级
|
||||
*/
|
||||
private Integer threadPriority = Thread.NORM_PRIORITY;
|
||||
|
||||
/**
|
||||
* 描述 : 线程名称
|
||||
*/
|
||||
private String threadNamePrefix = "defaultThreadPool";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+59
-59
@@ -1,59 +1,59 @@
|
||||
package org.itkk.udf.core;
|
||||
|
||||
import org.itkk.udf.core.exception.handle.RmsResponseErrorHandler;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.http.client.ClientHttpRequestFactory;
|
||||
import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
||||
import org.springframework.retry.annotation.EnableRetry;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
/**
|
||||
* 描述 : 系统入口
|
||||
*
|
||||
* @author wangkang
|
||||
*/
|
||||
@ServletComponentScan
|
||||
@ComponentScan(basePackages = {"org.itkk"})
|
||||
@EnableAsync
|
||||
@RefreshScope
|
||||
@EnableRetry
|
||||
@EnableScheduling
|
||||
public class BaseApplication {
|
||||
|
||||
/**
|
||||
* 描述 : applicationConfig
|
||||
*/
|
||||
@Autowired
|
||||
private ApplicationConfig applicationConfig;
|
||||
|
||||
/**
|
||||
* 描述 : externalRestTemplate
|
||||
*
|
||||
* @param requestFactory requestFactory
|
||||
* @return RestTemplate
|
||||
*/
|
||||
@Bean(name = "externalRestTemplate")
|
||||
public RestTemplate externalRestTemplate(ClientHttpRequestFactory requestFactory) {
|
||||
RestTemplate restTemplate = new RestTemplate(requestFactory);
|
||||
restTemplate.setErrorHandler(new RmsResponseErrorHandler());
|
||||
return restTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : requestFactory
|
||||
*
|
||||
* @return ClientHttpRequestFactory
|
||||
*/
|
||||
@Bean
|
||||
public ClientHttpRequestFactory requestFactory() {
|
||||
SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
|
||||
requestFactory.setBufferRequestBody(applicationConfig.getBufferRequestBody());
|
||||
return requestFactory;
|
||||
}
|
||||
}
|
||||
package org.itkk.udf.core;
|
||||
|
||||
import org.itkk.udf.core.exception.handle.RmsResponseErrorHandler;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.http.client.ClientHttpRequestFactory;
|
||||
import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
||||
import org.springframework.retry.annotation.EnableRetry;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
/**
|
||||
* 描述 : 系统入口
|
||||
*
|
||||
* @author wangkang
|
||||
*/
|
||||
@ServletComponentScan
|
||||
@ComponentScan(basePackages = {"org.itkk"})
|
||||
@EnableAsync
|
||||
@RefreshScope
|
||||
@EnableRetry
|
||||
@EnableScheduling
|
||||
public class BaseApplication {
|
||||
|
||||
/**
|
||||
* 描述 : applicationConfig
|
||||
*/
|
||||
@Autowired
|
||||
private ApplicationConfig applicationConfig;
|
||||
|
||||
/**
|
||||
* 描述 : externalRestTemplate
|
||||
*
|
||||
* @param requestFactory requestFactory
|
||||
* @return RestTemplate
|
||||
*/
|
||||
@Bean(name = "externalRestTemplate")
|
||||
public RestTemplate externalRestTemplate(ClientHttpRequestFactory requestFactory) {
|
||||
RestTemplate restTemplate = new RestTemplate(requestFactory);
|
||||
restTemplate.setErrorHandler(new RmsResponseErrorHandler());
|
||||
return restTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : requestFactory
|
||||
*
|
||||
* @return ClientHttpRequestFactory
|
||||
*/
|
||||
@Bean
|
||||
public ClientHttpRequestFactory requestFactory() {
|
||||
SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
|
||||
requestFactory.setBufferRequestBody(applicationConfig.getBufferRequestBody());
|
||||
return requestFactory;
|
||||
}
|
||||
}
|
||||
+128
-128
@@ -1,128 +1,128 @@
|
||||
package org.itkk.udf.core;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import org.itkk.udf.core.exception.ErrorResult;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 描述 : rest响应对象
|
||||
*
|
||||
* @author wangkang
|
||||
*/
|
||||
@ApiModel(description = "响应消息体")
|
||||
@Data
|
||||
@ToString
|
||||
public class RestResponse<T> implements Serializable {
|
||||
|
||||
/**
|
||||
* 描述 : id
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 描述 : 响应ID
|
||||
*/
|
||||
@ApiModelProperty(value = "响应ID", required = true, dataType = "string")
|
||||
private String id = UUID.randomUUID().toString();
|
||||
|
||||
/**
|
||||
* 描述 : 状态码(业务定义)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态码(业务定义)", required = true, dataType = "string")
|
||||
private String code = Integer.toString(HttpStatus.OK.value());
|
||||
|
||||
/**
|
||||
* 描述 : 状态码描述(业务定义)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态码描述(业务定义)", required = true, dataType = "string")
|
||||
private String message = HttpStatus.OK.getReasonPhrase();
|
||||
|
||||
/**
|
||||
* 描述 : 结果集(泛型)
|
||||
*/
|
||||
@ApiModelProperty(value = "结果集(泛型)", required = true, dataType = "object")
|
||||
private T result = null; //NOSONAR
|
||||
|
||||
/**
|
||||
* 描述 : 错误
|
||||
*/
|
||||
@ApiModelProperty(value = "错误", required = true, dataType = "object")
|
||||
private ErrorResult error = null;
|
||||
|
||||
/**
|
||||
* 描述 : 构造函数
|
||||
*/
|
||||
public RestResponse() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : 构造函数
|
||||
*
|
||||
* @param result 结果集(泛型)
|
||||
*/
|
||||
public RestResponse(T result) {
|
||||
super();
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : 构造函数
|
||||
*
|
||||
* @param httpStatus http状态
|
||||
* @param error 错误
|
||||
*/
|
||||
public RestResponse(HttpStatus httpStatus, ErrorResult error) {
|
||||
super();
|
||||
this.code = Integer.toString(httpStatus.value());
|
||||
this.message = httpStatus.getReasonPhrase();
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : 构造函数
|
||||
*
|
||||
* @param code 状态码(业务定义)
|
||||
* @param message 状态码描述(业务定义)
|
||||
* @param error 错误
|
||||
*/
|
||||
public RestResponse(String code, String message, ErrorResult error) {
|
||||
super();
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : 构造函数
|
||||
*
|
||||
* @param code 状态码(业务定义)
|
||||
* @param message 状态码描述(业务定义)
|
||||
*/
|
||||
public RestResponse(String code, String message) {
|
||||
super();
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : 构造函数
|
||||
*
|
||||
* @param code 状态码(业务定义)
|
||||
* @param message 状态码描述(业务定义)
|
||||
* @param result 结果集(泛型)
|
||||
*/
|
||||
public RestResponse(String code, String message, T result) {
|
||||
super();
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
}
|
||||
package org.itkk.udf.core;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import org.itkk.udf.core.exception.ErrorResult;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 描述 : rest响应对象
|
||||
*
|
||||
* @author wangkang
|
||||
*/
|
||||
@ApiModel(description = "响应消息体")
|
||||
@Data
|
||||
@ToString
|
||||
public class RestResponse<T> implements Serializable {
|
||||
|
||||
/**
|
||||
* 描述 : id
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 描述 : 响应ID
|
||||
*/
|
||||
@ApiModelProperty(value = "响应ID", required = true, dataType = "string")
|
||||
private String id = UUID.randomUUID().toString();
|
||||
|
||||
/**
|
||||
* 描述 : 状态码(业务定义)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态码(业务定义)", required = true, dataType = "string")
|
||||
private String code = Integer.toString(HttpStatus.OK.value());
|
||||
|
||||
/**
|
||||
* 描述 : 状态码描述(业务定义)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态码描述(业务定义)", required = true, dataType = "string")
|
||||
private String message = HttpStatus.OK.getReasonPhrase();
|
||||
|
||||
/**
|
||||
* 描述 : 结果集(泛型)
|
||||
*/
|
||||
@ApiModelProperty(value = "结果集(泛型)", required = true, dataType = "object")
|
||||
private T result = null; //NOSONAR
|
||||
|
||||
/**
|
||||
* 描述 : 错误
|
||||
*/
|
||||
@ApiModelProperty(value = "错误", required = true, dataType = "object")
|
||||
private ErrorResult error = null;
|
||||
|
||||
/**
|
||||
* 描述 : 构造函数
|
||||
*/
|
||||
public RestResponse() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : 构造函数
|
||||
*
|
||||
* @param result 结果集(泛型)
|
||||
*/
|
||||
public RestResponse(T result) {
|
||||
super();
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : 构造函数
|
||||
*
|
||||
* @param httpStatus http状态
|
||||
* @param error 错误
|
||||
*/
|
||||
public RestResponse(HttpStatus httpStatus, ErrorResult error) {
|
||||
super();
|
||||
this.code = Integer.toString(httpStatus.value());
|
||||
this.message = httpStatus.getReasonPhrase();
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : 构造函数
|
||||
*
|
||||
* @param code 状态码(业务定义)
|
||||
* @param message 状态码描述(业务定义)
|
||||
* @param error 错误
|
||||
*/
|
||||
public RestResponse(String code, String message, ErrorResult error) {
|
||||
super();
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : 构造函数
|
||||
*
|
||||
* @param code 状态码(业务定义)
|
||||
* @param message 状态码描述(业务定义)
|
||||
*/
|
||||
public RestResponse(String code, String message) {
|
||||
super();
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : 构造函数
|
||||
*
|
||||
* @param code 状态码(业务定义)
|
||||
* @param message 状态码描述(业务定义)
|
||||
* @param result 结果集(泛型)
|
||||
*/
|
||||
public RestResponse(String code, String message, T result) {
|
||||
super();
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
}
|
||||
+50
-50
@@ -1,50 +1,50 @@
|
||||
/**
|
||||
* ThreadPoolConfig.java
|
||||
* Created at 2017-05-03
|
||||
* Created by Administrator
|
||||
* Copyright (C) 2016 itkk.org, All rights reserved.
|
||||
*/
|
||||
package org.itkk.udf.core;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
/**
|
||||
* 描述 : ThreadPoolConfig
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
@Configuration
|
||||
public class ThreadPoolConfig {
|
||||
|
||||
/**
|
||||
* 描述 : applicationConfig
|
||||
*/
|
||||
@Autowired
|
||||
private ApplicationConfig applicationConfig;
|
||||
|
||||
/**
|
||||
* 描述 : 默认线程池
|
||||
*
|
||||
* @return Executor
|
||||
*/
|
||||
@Bean
|
||||
public Executor defaultThreadPool() {
|
||||
ThreadPoolTaskScheduler executor = new ThreadPoolTaskScheduler();
|
||||
//设置线程池
|
||||
executor.setPoolSize(applicationConfig.getThreadPool().getPoolSize());
|
||||
executor.setThreadPriority(applicationConfig.getThreadPool().getThreadPriority());
|
||||
executor.setThreadNamePrefix(applicationConfig.getThreadPool().getThreadNamePrefix());
|
||||
// rejection-policy:当pool已经达到max size的时候,如何处理新任务
|
||||
// CALLER_RUNS:不在新线程中执行任务,而是由调用者所在的线程来执行
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
executor.initialize();
|
||||
return executor;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* ThreadPoolConfig.java
|
||||
* Created at 2017-05-03
|
||||
* Created by Administrator
|
||||
* Copyright (C) 2016 itkk.org, All rights reserved.
|
||||
*/
|
||||
package org.itkk.udf.core;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
/**
|
||||
* 描述 : ThreadPoolConfig
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
@Configuration
|
||||
public class ThreadPoolConfig {
|
||||
|
||||
/**
|
||||
* 描述 : applicationConfig
|
||||
*/
|
||||
@Autowired
|
||||
private ApplicationConfig applicationConfig;
|
||||
|
||||
/**
|
||||
* 描述 : 默认线程池
|
||||
*
|
||||
* @return Executor
|
||||
*/
|
||||
@Bean
|
||||
public Executor defaultThreadPool() {
|
||||
ThreadPoolTaskScheduler executor = new ThreadPoolTaskScheduler();
|
||||
//设置线程池
|
||||
executor.setPoolSize(applicationConfig.getThreadPool().getPoolSize());
|
||||
executor.setThreadPriority(applicationConfig.getThreadPool().getThreadPriority());
|
||||
executor.setThreadNamePrefix(applicationConfig.getThreadPool().getThreadNamePrefix());
|
||||
// rejection-policy:当pool已经达到max size的时候,如何处理新任务
|
||||
// CALLER_RUNS:不在新线程中执行任务,而是由调用者所在的线程来执行
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
executor.initialize();
|
||||
return executor;
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user