Commit 3b269d89 by zhengxj

finish 配置中心 on 20190408 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@19377 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 611ea68e
......@@ -33,6 +33,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>
</dependencies>
<build>
......
......@@ -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.transaction.annotation.EnableTransactionManagement;
......@@ -22,6 +23,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@ServletComponentScan
@EnableEurekaClient
@EnableTransactionManagement
@EnableDiscoveryClient
@MapperScan(basePackages={"com.glsx.task.mapper"})
public class Application extends SpringBootServletInitializer{
......
......@@ -7,6 +7,11 @@ server.port=8098
#eurekaClient
eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/
#configClient
spring.cloud.config.discovery.serviceId=car-service-config
spring.cloud.config.discovery.enabled=true
spring.cloud.config.profile=local
#\u5fc3\u8df3
#eureka.instance.lease-renewal-interval-in-seconds=5
......
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.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.usercenter.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
##freemarker
spring.freemarker.cache=false
spring.freemarker.charset=UTF-8
spring.freemarker.check-template-location=true
spring.freemarker.content-type=text/html
spring.freemarker.enabled=true
spring.freemarker.suffix=.ftl
spring.freemarker.template-loader-path=classpath:/templates
#\u9759\u6001\u8d44\u6e90\u8def\u5f84
spring.mvc.static-path-pattern=/**
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!