Commit cc249fb7 by zhengxj

finish 配置中心 on 20190408 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@19379 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 7447628d
......@@ -44,6 +44,11 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<!-- ConfigClient -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-client</artifactId>
</dependency>
<!-- hibernate.validator -->
<dependency>
<groupId>org.hibernate.validator</groupId>
......
......@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
......@@ -24,6 +25,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@ComponentScan("com.glsx")
@ServletComponentScan
@EnableEurekaClient
@EnableDiscoveryClient
@EnableTransactionManagement
@EnableFeignClients(basePackages = {"com.glsx.common.feign.client"})
@MapperScan(basePackages={"com.glsx.ordercenter.mapper"})
......
##\u5f00\u53d1\u4e2d\u9700\u8981\u8bfb\u53d6\u7684\u914d\u7f6e\u6587\u4ef6
spring.profiles.active=test
#spring.profiles.active=test
logging.level.com.glsx.ordercenter=DEBUG
server.servlet.context-path=/carservice/ordercenter
......
......@@ -2,6 +2,12 @@
spring.application.name=car-service-ordercenter
server.port=8094
#configClient
spring.cloud.config.discovery.serviceId=car-service-config
spring.cloud.config.discovery.enabled=true
spring.cloud.config.profile=test
##\u65e5\u5fd7 test
logging.level.com.glsx.ordercenter=DEBUG
logging.path=/data/java_log/jetty/carService/car-service-ordercenter
......
spring.datasource.name=dev
#spring.datasource.url=jdbc:mysql://192.168.0.39:3306/glsx_car_service
#spring.datasource.username=root
#spring.datasource.password=123456
spring.datasource.url=jdbc:mysql://14.17.100.222:3307/glsx_car_service
spring.datasource.username=root
spring.datasource.password=Msd^*$@online
#spring.datasource.connectionProperties="config.decrypt=true;config.decrypt.key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANj300lzSmW05DuzVoluFG6oza+WlEbv2aYCQA2+pkf0mE4p19UAcxfY/BweOyJ6TBNoY5XebPqoiav5lsKVD6sCAwEAAQ=="
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.filters=stat
spring.datasource.maxActive=20
spring.datasource.initialSize=5
spring.datasource.maxWait=60000
spring.datasource.minIdle=5
spring.datasource.timeBetweenEvictionRunsMillis=60000
spring.datasource.minEvictableIdleTimeMillis=300000
spring.datasource.validationQuery=select 'x'
spring.datasource.testWhileIdle=true
spring.datasource.testOnBorrow=false
spring.datasource.testOnReturn=false
spring.datasource.poolPreparedStatements=true
spring.datasource.maxOpenPreparedStatements=50
#mybatis\u96c6\u6210\u914d\u7f6e
mybatis.mapperLocations=classpath*:mapper/*.xml
mybatis.typeAliasesPackage=com.glsx.ordercenter.pojo
#pagehelper
pagehelper.helperDialect=mysql
pagehelper.supportMethodsArguments=true
pagehelper.params=count=countSql
spring.jmx.enabled=false
# MULTIPART (MultipartProperties)
# Whether to enable support of multipart uploads.
spring.servlet.multipart.enabled=true
# Max file size. Values can use the suffixes "MB" or "KB" to indicate megabytes or kilobytes, respectively.
spring.servlet.multipart.max-file-size=20MB
# Max request size. Values can use the suffixes "MB" or "KB" to indicate megabytes or kilobytes, respectively.
spring.servlet.multipart.max-request-size=20MB
# REDIS (RedisProperties)
# Database index used by the connection factory.
spring.redis.database=0
# Redis server host.
spring.redis.host=192.168.0.39
# Maximum number of connections that can be allocated by the pool at a given time. Use a negative value for no limit.
spring.redis.lettuce.pool.max-active=32
# Maximum number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.
spring.redis.lettuce.pool.max-idle=32
# Maximum amount of time a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.
spring.redis.lettuce.pool.max-wait=-1ms
# Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if it is positive.
spring.redis.lettuce.pool.min-idle=0
# Shutdown timeout.
spring.redis.lettuce.shutdown-timeout=100ms
#Login password of the redis server.
spring.redis.password=hhxredis
# Redis server port.
spring.redis.port=6379
#Whether to enable SSL support.
spring.redis.ssl=false
# Connection timeout.
spring.redis.timeout=6000ms
#\u77ed\u4fe1
#sms.url=http://192.168.3.206:8118/router111
#sms.url=http://qcdidicb.glsx.net:7060/router
sms.source=frms_sms_assign
##fastdfs
fdfs.soTimeout=1500
fdfs.connectTimeout=600
fdfs.thumbImage.width=150
fdfs.thumbImage.height=150
fdfs.trackerList=192.168.0.63:22122
#fdfs_tracker_nginx_port=80
fdfs_tracker_nginx_domain=http://192.168.0.63
#eurekaClient
eureka.client.enabled=true
eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/
#\u5fc3\u8df3
#eureka.instance.lease-renewal-interval-in-seconds=5
##feign\u914d\u7f6e
feign.client.config.default.connectTimeout=10000
feign.client.config.default.readTimeout=10000
feign.client.config.default.loggerLevel=basic
\ No newline at end of file
spring.datasource.name=test
#spring.datasource.url=jdbc:mysql://192.168.3.222:3307/glsx_car_service
#spring.datasource.username=biz_car_service
#spring.datasource.password=jiuir29e
spring.datasource.url=jdbc:mysql://14.17.100.222:3307/glsx_car_service
spring.datasource.username=root
spring.datasource.password=Msd^*$@online
#spring.datasource.connectionProperties="config.decrypt=true;config.decrypt.key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANj300lzSmW05DuzVoluFG6oza+WlEbv2aYCQA2+pkf0mE4p19UAcxfY/BweOyJ6TBNoY5XebPqoiav5lsKVD6sCAwEAAQ=="
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.filters=stat
spring.datasource.maxActive=20
spring.datasource.initialSize=5
spring.datasource.maxWait=60000
spring.datasource.minIdle=5
spring.datasource.timeBetweenEvictionRunsMillis=60000
spring.datasource.minEvictableIdleTimeMillis=300000
spring.datasource.validationQuery=select 'x'
spring.datasource.testWhileIdle=true
spring.datasource.testOnBorrow=false
spring.datasource.testOnReturn=false
spring.datasource.poolPreparedStatements=true
spring.datasource.maxOpenPreparedStatements=50
#mybatis\u96c6\u6210\u914d\u7f6e
mybatis.mapperLocations=classpath*:mapper/*.xml
mybatis.typeAliasesPackage=com.glsx.ordercenter.pojo
#pagehelper
pagehelper.helperDialect=mysql
pagehelper.supportMethodsArguments=true
pagehelper.params=count=countSql
spring.jmx.enabled=false
# MULTIPART (MultipartProperties)
# Whether to enable support of multipart uploads.
spring.servlet.multipart.enabled=true
# Max file size. Values can use the suffixes "MB" or "KB" to indicate megabytes or kilobytes, respectively.
spring.servlet.multipart.max-file-size=20MB
# Max request size. Values can use the suffixes "MB" or "KB" to indicate megabytes or kilobytes, respectively.
spring.servlet.multipart.max-request-size=20MB
# REDIS (RedisProperties)
# Database index used by the connection factory.
spring.redis.database=0
# Redis server host.
spring.redis.host=192.168.3.222
# Maximum number of connections that can be allocated by the pool at a given time. Use a negative value for no limit.
spring.redis.lettuce.pool.max-active=32
# Maximum number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.
spring.redis.lettuce.pool.max-idle=32
# Maximum amount of time a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.
spring.redis.lettuce.pool.max-wait=-1ms
# Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if it is positive.
spring.redis.lettuce.pool.min-idle=0
# Shutdown timeout.
spring.redis.lettuce.shutdown-timeout=100ms
#Login password of the redis server.
spring.redis.password=hhxredis
# Redis server port.
spring.redis.port=6380
#Whether to enable SSL support.
spring.redis.ssl=false
# Connection timeout.
spring.redis.timeout=6000ms
#\u77ed\u4fe1
#sms.url=http://192.168.3.206:8118/router111
sms.url=http://qcdidicb.glsx.net:7060/router
sms.source=frms_sms_assign
##fastdfs
fdfs.soTimeout=1500
fdfs.connectTimeout=600
fdfs.thumbImage.width=150
fdfs.thumbImage.height=150
fdfs.trackerList=192.168.3.61:22122
#fdfs_tracker_nginx_port=80
fdfs_tracker_nginx_domain=http://fdfs.didihu.com.cn
#eurekaClient
eureka.client.enabled=true
eureka.client.serviceUrl.defaultZone=http://registry.glsx.com/eureka/
#\u5fc3\u8df3
#eureka.instance.lease-renewal-interval-in-seconds=5
##feign\u914d\u7f6e
feign.client.config.default.connectTimeout=10000
feign.client.config.default.readTimeout=10000
feign.client.config.default.loggerLevel=basic
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!