切换导航条
此项目
正在载入...
登录
朱兆平
/
spring cloud基础开发框架
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
1
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
朱兆平
6 years ago
提交
2bfbaab98961b5a5c33fda25c7f7919a2b7be0f9
1 个父辈
b458306c
yam配置文件
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
217 行增加
和
0 行删除
config/application.yml
src/main/resources/application.properties
src/main/resources/application.yml
config/application.yml
0 → 100644
查看文件 @
2bfbaab
#上传文件的路径,要带斜杠
web
:
upload-path
:
upload/
server
:
port
:
7003
servlet
:
context-path
:
${SERVER_CONTEXTPATH:}
spring
:
mvc
:
#静态资源,设置上传文件的访问,
static-path-pattern
:
/**
resources
:
static-locations
:
classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,file:${web.upload-path}
application
:
name
:
tianbo.base.dev.devkit
jackson
:
serialization
:
FAIL_ON_EMPTY_BEANS
:
false
#springboot2.0之后会把Date类型字段自动给转成UTC字符串 如:1990-11-26T16:00:00.000+0000,如果想转成时间戳在application.properties配置文件增加以下配置
date-format
:
yyyy-MM-dd HH:mm:ss
#时区必须要设置
time-zone
:
GMT+8
#ALWAYS的意思是即时属性为null,仍然也会输出这个key
default-property-inclusion
:
always
spring
:
cloud
:
#eureka主机名,会在控制页面中显示
#DEV环境关闭注册。
features
:
enabled
:
false
discovery
:
enabled
:
false
service-registry
:
auto-registration
:
enabled
:
false
eureka
:
instance
:
#eureka服务器页面中status的请求路径
status-page-url
:
http://${eureka.instance.hostname}:${server.port}/index
prefer-ip-address
:
true
instance-id
:
${spring.cloud.client.ip-address}:${server.port}
hostname
:
${spring.cloud.client.ip-address}
client
:
#eureka注册中心服务器地址
service-url
:
defaultZone
:
http://10.50.3.82:19527/eureka/
registry-fetch-interval-seconds
:
30
lease-renewal-interval-in-seconds
:
15
lease-expiration-duration-in-seconds
:
45
spring
:
datasource
:
type
:
com.alibaba.druid.pool.DruidDataSource
#oracle
#driver-class-name=oracle.jdbc.OracleDriver
#url=jdbc:oracle:thin:@10.50.3.68:1521:CGODW
#username=CGOETL
#password=1q2w3e4r
#spring datasource mysql,注意编码配置,缺少数据库编码配置容易引起中文入库乱码
url
:
jdbc:mysql://127.0.0.1:3307/statistics?useUnicode=true&characterEncoding=utf8
username
:
root
password
:
driver-class-name
:
com.mysql.jdbc.Driver
max-idle
:
10
max-wait
:
10000
min-idle
:
5
initial-size
:
5
#配置初始化大小/最小/最大
druid
:
initial-size
:
1
min-idle
:
1
max-active
:
20
#获取连接等待超时时间
max-wait
:
60000
#一个连接在池中最小生存的时间
min-evictable-idle-time-millis
:
300000
#间隔多久进行一次检测,检测需要关闭的空闲连接
time-between-eviction-runs-millis
:
60000
#mysql
validation-query
:
SELECT 1 FROM DUAL
#oracle
#druid.validation-query:SELECT 'x' FROM DUAL
test-while-idle
:
true
test-on-borrow
:
false
test-on-return
:
false
default-auto-commit
:
true
mybatis
:
mapper-locations
:
classpath:mapping/*.xml
type-aliases-package
:
com.tianbo.warehouse.model
pagehelper
:
#auto-dialect: true
#auto-runtime-dialect: true
helper-dialect
:
mysql
reasonable
:
true
support-methods-arguments
:
true
params
:
count=countSql
#debug配置
trace
:
true
debug
:
true
logging
:
level
:
org.apache.tomcat
:
info
com.tianbo.warehouse.dao
:
DEBUG
org.springframework.security
:
trace
...
...
src/main/resources/application.properties
查看文件 @
2bfbaab
...
...
@@ -16,6 +16,7 @@ spring.application.name=tianbo.base.dev.devkit
spring.jackson.serialization.fail-on-empty-
beans
=
false
#springboot2.0之后会把Date类型字段自动给转成UTC字符串 如:1990-11-26T16:00:00.000+0000,如果想转成时间戳在application.properties配置文件增加以下配置
#jackson相关配置
spring.jackson.date-
format
=
yyyy-MM-dd HH:mm:ss
...
...
src/main/resources/application.yml
0 → 100644
查看文件 @
2bfbaab
#上传文件的路径,要带斜杠
web
:
upload-path
:
upload/
server
:
port
:
7003
servlet
:
context-path
:
${SERVER_CONTEXTPATH:}
spring
:
mvc
:
#静态资源,设置上传文件的访问,
static-path-pattern
:
/**
resources
:
static-locations
:
classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,file:${web.upload-path}
application
:
name
:
tianbo.base.dev.devkit
jackson
:
serialization
:
FAIL_ON_EMPTY_BEANS
:
false
#springboot2.0之后会把Date类型字段自动给转成UTC字符串 如:1990-11-26T16:00:00.000+0000,如果想转成时间戳在application.properties配置文件增加以下配置
date-format
:
yyyy-MM-dd HH:mm:ss
#时区必须要设置
time-zone
:
GMT+8
#ALWAYS的意思是即时属性为null,仍然也会输出这个key
default-property-inclusion
:
always
spring
:
cloud
:
#eureka主机名,会在控制页面中显示
#DEV环境关闭注册。
features
:
enabled
:
false
discovery
:
enabled
:
false
service-registry
:
auto-registration
:
enabled
:
false
eureka
:
instance
:
#eureka服务器页面中status的请求路径
status-page-url
:
http://${eureka.instance.hostname}:${server.port}/index
prefer-ip-address
:
true
instance-id
:
${spring.cloud.client.ip-address}:${server.port}
hostname
:
${spring.cloud.client.ip-address}
client
:
#eureka注册中心服务器地址
service-url
:
defaultZone
:
http://10.50.3.82:19527/eureka/
registry-fetch-interval-seconds
:
30
lease-renewal-interval-in-seconds
:
15
lease-expiration-duration-in-seconds
:
45
spring
:
datasource
:
type
:
com.alibaba.druid.pool.DruidDataSource
#oracle
#driver-class-name=oracle.jdbc.OracleDriver
#url=jdbc:oracle:thin:@10.50.3.68:1521:CGODW
#username=CGOETL
#password=1q2w3e4r
#spring datasource mysql,注意编码配置,缺少数据库编码配置容易引起中文入库乱码
url
:
jdbc:mysql://127.0.0.1:3307/statistics?useUnicode=true&characterEncoding=utf8
username
:
root
password
:
driver-class-name
:
com.mysql.jdbc.Driver
max-idle
:
10
max-wait
:
10000
min-idle
:
5
initial-size
:
5
#配置初始化大小/最小/最大
druid
:
initial-size
:
1
min-idle
:
1
max-active
:
20
#获取连接等待超时时间
max-wait
:
60000
#一个连接在池中最小生存的时间
min-evictable-idle-time-millis
:
300000
#间隔多久进行一次检测,检测需要关闭的空闲连接
time-between-eviction-runs-millis
:
60000
#mysql
validation-query
:
SELECT 1 FROM DUAL
#oracle
#druid.validation-query:SELECT 'x' FROM DUAL
test-while-idle
:
true
test-on-borrow
:
false
test-on-return
:
false
default-auto-commit
:
true
mybatis
:
mapper-locations
:
classpath:mapping/*.xml
type-aliases-package
:
com.tianbo.warehouse.model
pagehelper
:
#auto-dialect: true
#auto-runtime-dialect: true
helper-dialect
:
mysql
reasonable
:
true
support-methods-arguments
:
true
params
:
count=countSql
#debug配置
trace
:
true
debug
:
true
logging
:
level
:
org.apache.tomcat
:
info
com.tianbo.warehouse.dao
:
DEBUG
org.springframework.security
:
trace
...
...
请
注册
或
登录
后发表评论