正在显示
3 个修改的文件
包含
217 行增加
和
0 行删除
config/application.yml
0 → 100644
1 | +#上传文件的路径,要带斜杠 | ||
2 | +web: | ||
3 | + upload-path: upload/ | ||
4 | +server: | ||
5 | + port: 7003 | ||
6 | + servlet: | ||
7 | + context-path: ${SERVER_CONTEXTPATH:} | ||
8 | +spring: | ||
9 | + mvc: | ||
10 | + #静态资源,设置上传文件的访问, | ||
11 | + static-path-pattern: /** | ||
12 | + resources: | ||
13 | + static-locations: classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,file:${web.upload-path} | ||
14 | + application: | ||
15 | + name: tianbo.base.dev.devkit | ||
16 | + jackson: | ||
17 | + serialization: | ||
18 | + FAIL_ON_EMPTY_BEANS: false | ||
19 | + #springboot2.0之后会把Date类型字段自动给转成UTC字符串 如:1990-11-26T16:00:00.000+0000,如果想转成时间戳在application.properties配置文件增加以下配置 | ||
20 | + date-format: yyyy-MM-dd HH:mm:ss | ||
21 | + #时区必须要设置 | ||
22 | + time-zone: GMT+8 | ||
23 | + #ALWAYS的意思是即时属性为null,仍然也会输出这个key | ||
24 | + default-property-inclusion: always | ||
25 | +spring: | ||
26 | + cloud: | ||
27 | + #eureka主机名,会在控制页面中显示 | ||
28 | + #DEV环境关闭注册。 | ||
29 | + features: | ||
30 | + enabled: false | ||
31 | + discovery: | ||
32 | + enabled: false | ||
33 | + service-registry: | ||
34 | + auto-registration: | ||
35 | + enabled: false | ||
36 | + | ||
37 | +eureka: | ||
38 | + instance: | ||
39 | + #eureka服务器页面中status的请求路径 | ||
40 | + status-page-url: http://${eureka.instance.hostname}:${server.port}/index | ||
41 | + prefer-ip-address: true | ||
42 | + instance-id: ${spring.cloud.client.ip-address}:${server.port} | ||
43 | + hostname: ${spring.cloud.client.ip-address} | ||
44 | + client: | ||
45 | + #eureka注册中心服务器地址 | ||
46 | + service-url: | ||
47 | + defaultZone: http://10.50.3.82:19527/eureka/ | ||
48 | + registry-fetch-interval-seconds: 30 | ||
49 | + lease-renewal-interval-in-seconds: 15 | ||
50 | + lease-expiration-duration-in-seconds: 45 | ||
51 | + | ||
52 | +spring: | ||
53 | + datasource: | ||
54 | + type: com.alibaba.druid.pool.DruidDataSource | ||
55 | + #oracle | ||
56 | + #driver-class-name=oracle.jdbc.OracleDriver | ||
57 | + #url=jdbc:oracle:thin:@10.50.3.68:1521:CGODW | ||
58 | + #username=CGOETL | ||
59 | + #password=1q2w3e4r | ||
60 | + #spring datasource mysql,注意编码配置,缺少数据库编码配置容易引起中文入库乱码 | ||
61 | + url: jdbc:mysql://127.0.0.1:3307/statistics?useUnicode=true&characterEncoding=utf8 | ||
62 | + username: root | ||
63 | + password: | ||
64 | + driver-class-name: com.mysql.jdbc.Driver | ||
65 | + max-idle: 10 | ||
66 | + max-wait: 10000 | ||
67 | + min-idle: 5 | ||
68 | + initial-size: 5 | ||
69 | + #配置初始化大小/最小/最大 | ||
70 | + druid: | ||
71 | + initial-size: 1 | ||
72 | + min-idle: 1 | ||
73 | + max-active: 20 | ||
74 | + #获取连接等待超时时间 | ||
75 | + max-wait: 60000 | ||
76 | + #一个连接在池中最小生存的时间 | ||
77 | + min-evictable-idle-time-millis: 300000 | ||
78 | + #间隔多久进行一次检测,检测需要关闭的空闲连接 | ||
79 | + time-between-eviction-runs-millis: 60000 | ||
80 | + #mysql | ||
81 | + validation-query: SELECT 1 FROM DUAL | ||
82 | + #oracle | ||
83 | + #druid.validation-query:SELECT 'x' FROM DUAL | ||
84 | + test-while-idle: true | ||
85 | + test-on-borrow: false | ||
86 | + test-on-return: false | ||
87 | + default-auto-commit: true | ||
88 | + | ||
89 | +mybatis: | ||
90 | + mapper-locations: classpath:mapping/*.xml | ||
91 | + type-aliases-package: com.tianbo.warehouse.model | ||
92 | +pagehelper: | ||
93 | + #auto-dialect: true | ||
94 | + #auto-runtime-dialect: true | ||
95 | + helper-dialect: mysql | ||
96 | + reasonable: true | ||
97 | + support-methods-arguments: true | ||
98 | + params: count=countSql | ||
99 | + | ||
100 | +#debug配置 | ||
101 | +trace: true | ||
102 | +debug: true | ||
103 | +logging: | ||
104 | + level: | ||
105 | + org.apache.tomcat: info | ||
106 | + com.tianbo.warehouse.dao: DEBUG | ||
107 | + org.springframework.security: trace | ||
108 | + |
@@ -16,6 +16,7 @@ spring.application.name=tianbo.base.dev.devkit | @@ -16,6 +16,7 @@ spring.application.name=tianbo.base.dev.devkit | ||
16 | 16 | ||
17 | spring.jackson.serialization.fail-on-empty-beans=false | 17 | spring.jackson.serialization.fail-on-empty-beans=false |
18 | 18 | ||
19 | + | ||
19 | #springboot2.0之后会把Date类型字段自动给转成UTC字符串 如:1990-11-26T16:00:00.000+0000,如果想转成时间戳在application.properties配置文件增加以下配置 | 20 | #springboot2.0之后会把Date类型字段自动给转成UTC字符串 如:1990-11-26T16:00:00.000+0000,如果想转成时间戳在application.properties配置文件增加以下配置 |
20 | #jackson相关配置 | 21 | #jackson相关配置 |
21 | spring.jackson.date-format = yyyy-MM-dd HH:mm:ss | 22 | spring.jackson.date-format = yyyy-MM-dd HH:mm:ss |
src/main/resources/application.yml
0 → 100644
1 | +#上传文件的路径,要带斜杠 | ||
2 | +web: | ||
3 | + upload-path: upload/ | ||
4 | +server: | ||
5 | + port: 7003 | ||
6 | + servlet: | ||
7 | + context-path: ${SERVER_CONTEXTPATH:} | ||
8 | +spring: | ||
9 | + mvc: | ||
10 | + #静态资源,设置上传文件的访问, | ||
11 | + static-path-pattern: /** | ||
12 | + resources: | ||
13 | + static-locations: classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,file:${web.upload-path} | ||
14 | + application: | ||
15 | + name: tianbo.base.dev.devkit | ||
16 | + jackson: | ||
17 | + serialization: | ||
18 | + FAIL_ON_EMPTY_BEANS: false | ||
19 | + #springboot2.0之后会把Date类型字段自动给转成UTC字符串 如:1990-11-26T16:00:00.000+0000,如果想转成时间戳在application.properties配置文件增加以下配置 | ||
20 | + date-format: yyyy-MM-dd HH:mm:ss | ||
21 | + #时区必须要设置 | ||
22 | + time-zone: GMT+8 | ||
23 | + #ALWAYS的意思是即时属性为null,仍然也会输出这个key | ||
24 | + default-property-inclusion: always | ||
25 | +spring: | ||
26 | + cloud: | ||
27 | + #eureka主机名,会在控制页面中显示 | ||
28 | + #DEV环境关闭注册。 | ||
29 | + features: | ||
30 | + enabled: false | ||
31 | + discovery: | ||
32 | + enabled: false | ||
33 | + service-registry: | ||
34 | + auto-registration: | ||
35 | + enabled: false | ||
36 | + | ||
37 | +eureka: | ||
38 | + instance: | ||
39 | + #eureka服务器页面中status的请求路径 | ||
40 | + status-page-url: http://${eureka.instance.hostname}:${server.port}/index | ||
41 | + prefer-ip-address: true | ||
42 | + instance-id: ${spring.cloud.client.ip-address}:${server.port} | ||
43 | + hostname: ${spring.cloud.client.ip-address} | ||
44 | + client: | ||
45 | + #eureka注册中心服务器地址 | ||
46 | + service-url: | ||
47 | + defaultZone: http://10.50.3.82:19527/eureka/ | ||
48 | + registry-fetch-interval-seconds: 30 | ||
49 | + lease-renewal-interval-in-seconds: 15 | ||
50 | + lease-expiration-duration-in-seconds: 45 | ||
51 | + | ||
52 | +spring: | ||
53 | + datasource: | ||
54 | + type: com.alibaba.druid.pool.DruidDataSource | ||
55 | + #oracle | ||
56 | + #driver-class-name=oracle.jdbc.OracleDriver | ||
57 | + #url=jdbc:oracle:thin:@10.50.3.68:1521:CGODW | ||
58 | + #username=CGOETL | ||
59 | + #password=1q2w3e4r | ||
60 | + #spring datasource mysql,注意编码配置,缺少数据库编码配置容易引起中文入库乱码 | ||
61 | + url: jdbc:mysql://127.0.0.1:3307/statistics?useUnicode=true&characterEncoding=utf8 | ||
62 | + username: root | ||
63 | + password: | ||
64 | + driver-class-name: com.mysql.jdbc.Driver | ||
65 | + max-idle: 10 | ||
66 | + max-wait: 10000 | ||
67 | + min-idle: 5 | ||
68 | + initial-size: 5 | ||
69 | + #配置初始化大小/最小/最大 | ||
70 | + druid: | ||
71 | + initial-size: 1 | ||
72 | + min-idle: 1 | ||
73 | + max-active: 20 | ||
74 | + #获取连接等待超时时间 | ||
75 | + max-wait: 60000 | ||
76 | + #一个连接在池中最小生存的时间 | ||
77 | + min-evictable-idle-time-millis: 300000 | ||
78 | + #间隔多久进行一次检测,检测需要关闭的空闲连接 | ||
79 | + time-between-eviction-runs-millis: 60000 | ||
80 | + #mysql | ||
81 | + validation-query: SELECT 1 FROM DUAL | ||
82 | + #oracle | ||
83 | + #druid.validation-query:SELECT 'x' FROM DUAL | ||
84 | + test-while-idle: true | ||
85 | + test-on-borrow: false | ||
86 | + test-on-return: false | ||
87 | + default-auto-commit: true | ||
88 | + | ||
89 | +mybatis: | ||
90 | + mapper-locations: classpath:mapping/*.xml | ||
91 | + type-aliases-package: com.tianbo.warehouse.model | ||
92 | +pagehelper: | ||
93 | + #auto-dialect: true | ||
94 | + #auto-runtime-dialect: true | ||
95 | + helper-dialect: mysql | ||
96 | + reasonable: true | ||
97 | + support-methods-arguments: true | ||
98 | + params: count=countSql | ||
99 | + | ||
100 | +#debug配置 | ||
101 | +trace: true | ||
102 | +debug: true | ||
103 | +logging: | ||
104 | + level: | ||
105 | + org.apache.tomcat: info | ||
106 | + com.tianbo.warehouse.dao: DEBUG | ||
107 | + org.springframework.security: trace | ||
108 | + |
-
请 注册 或 登录 后发表评论