SpringBoot中的全局配置application.properties详解

#端口号
server.port=8090
#项目路径
server.Context-path=/
#前缀
spring.mvc.view.prefix=/WEB-INF/views/
#后缀
spring.mvc.view.suffix=.jsp

#数据库类型
spring.jpa.database = MYSQL
#数据库
spring.datasource.url = jdbc:mysql://localhost:3306/jtdb?useUnicode=true&characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true
#用户名
spring.datasource.username =root
#密码
spring.datasource.password =root
#数据库连接驱动
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#数据库初始连接为1
spring.datasource.druid.initial-size=1
#数据库最小连接为1
spring.datasource.druid.min-idle=1
#数据库最大连接为20
spring.datasource.druid.max-active=20
spring.datasource.druid.test-on-borrow=true
spring.datasource.druid.stat-view-servlet.allow=true
#映射到com.jt.manage.pojo包
mybatis.typeAliasesPackage=com.jt.manage.pojo
#引用mappers下面所有后缀名为xml的文件
mybatis.mapperLocations=classpath:mappers/*.xml
mybatis.configuration.mapUnderscoreToCamelCase=true
mybatis.configuration.cacheEnabled=false
#处理图片上传的数据
pathw=D:/jt-upload
urlw=image.jt.com

#Redis
#连接信息 ip port
spring.redis.nodes=176.129.8.128:6379,176.129.8.128:6380,176.129.8.128:6381
#连接池
spring.redis.pool.max-idle=8
spring.redis.pool.min-idle=0
spring.redis.pool.max-active=20
spring.redis.pool.max-wait=5000
#超时
spring.redis.timeout=1000000
#Rabbitmq env 
spring.rabbitmq.host=10.9.48.69
spring.rabbitmq.port=5672
spring.rabbitmq.username=jtadmin
spring.rabbitmq.password=123456
spring.rabbitmq.virtualHost=/jt
#httpClient
http.maxTotal = 100
http.defaultMaxPerRoute = 20
http.connectTimeout=1000
http.connectionRequestTimeout=500
http.socketTimeout=10000
http.staleConnectionCheckEnabled=true

#es
cluster-name=elasticsearch
cluster-nodes=176.129.8.128:9300

 

你可能感兴趣的:(java后端)