Commit 30b8a5b9497ecaca469ff34d83fdc5d6841bd6f5
1 parent
c2bb8b1c
prod配置文件优化,接口日志输出格式优化
Signed-off-by: TanYibin <5491541@qq.com>
Showing
3 changed files
with
43 additions
and
31 deletions
huaheng-wms-core/src/main/java/org/jeecg/modules/ngalain/aop/LogRecordAspect.java renamed to huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/aspectj/LogRecordAspect.java
1 | -package org.jeecg.modules.ngalain.aop; | |
1 | +package org.jeecg.modules.wms.framework.aspectj; | |
2 | 2 | |
3 | 3 | import javax.servlet.http.HttpServletRequest; |
4 | 4 | |
... | ... | @@ -34,13 +34,13 @@ public class LogRecordAspect { |
34 | 34 | // 获取请求的request |
35 | 35 | HttpServletRequest request = attributes.getRequest(); |
36 | 36 | String url = request.getRequestURL().toString(); |
37 | - String className = point.getTarget().getClass().getName(); | |
37 | + String className = point.getTarget().getClass().getSimpleName(); | |
38 | 38 | String methodName = point.getSignature().getName(); |
39 | - log.info("[Controller start] {}[{}][{}]\r\n{}.{}", url, request.getMethod(), ApiLoggerAspect.getIpAddr(request), className, methodName); | |
39 | + log.info("[{}] {} [{}.{}] [{}]", request.getMethod(), url, className, methodName, ApiLoggerAspect.getIpAddr(request)); | |
40 | 40 | // result的值就是被拦截方法的返回值 |
41 | 41 | Object result = point.proceed(); |
42 | 42 | long callTime = System.currentTimeMillis() - startTime; |
43 | - log.info("[Controller return] {}[{}ms]", url, callTime); | |
43 | + log.info("[{}] {} [{}.{}] [{}ms]", request.getMethod(), url, className, methodName, callTime); | |
44 | 44 | return result; |
45 | 45 | } |
46 | 46 | } |
47 | 47 | \ No newline at end of file |
... | ... |
huaheng-wms-core/src/main/resources/application-prod.yml
... | ... | @@ -113,7 +113,7 @@ spring: |
113 | 113 | # 初始化大小,最小,最大 |
114 | 114 | initial-size: 5 |
115 | 115 | min-idle: 5 |
116 | - maxActive: 1000 | |
116 | + maxActive: 20 | |
117 | 117 | # 配置获取连接等待超时的时间 |
118 | 118 | maxWait: 60000 |
119 | 119 | # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 |
... | ... | @@ -133,16 +133,16 @@ spring: |
133 | 133 | connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 |
134 | 134 | datasource: |
135 | 135 | master: |
136 | - url: jdbc:log4jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai | |
136 | + url: jdbc:mysql://172.16.29.45:3306/wms4?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true | |
137 | 137 | username: root |
138 | - password: root | |
139 | - driver-class-name: net.sf.log4jdbc.DriverSpy | |
138 | + password: hhsoftware | |
139 | + driver-class-name: com.mysql.cj.jdbc.Driver | |
140 | 140 | # 多数据源配置 |
141 | - #multi-datasource1: | |
142 | - #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai | |
143 | - #username: root | |
144 | - #password: root | |
145 | - #driver-class-name: com.mysql.cj.jdbc.Driver | |
141 | + # multi-datasource1: | |
142 | + # url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai | |
143 | + # username: root | |
144 | + # password: root | |
145 | + # driver-class-name: com.mysql.cj.jdbc.Driver | |
146 | 146 | # # 达梦数据库链接驱动 |
147 | 147 | # url: jdbc:dm://192.168.225.128:5236?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true |
148 | 148 | # username: WMS4 |
... | ... | @@ -151,14 +151,14 @@ spring: |
151 | 151 | #redis 配置 |
152 | 152 | redis: |
153 | 153 | database: 0 |
154 | - host: 127.0.0.1 | |
154 | + host: 172.16.29.77 | |
155 | 155 | port: 6379 |
156 | - password: '' | |
156 | + password: 123456 | |
157 | 157 | lettuce: |
158 | 158 | pool: |
159 | 159 | min-idle: 0 #最小等待连接中的数量,设 0 为没有限制 |
160 | 160 | max-idle: 8 #最大等待连接中的数量,设 0 为没有限制 |
161 | - max-active: 10 #最大连接数据库连接数,设 -1 为没有限制 | |
161 | + max-active: 10 #最大连接数据库连接数,设 -1 为没有限制 | |
162 | 162 | max-wait: 5s #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。 |
163 | 163 | time-between-eviction-runs: 1s #空闲对象逐出器线程的运行间隔时间.空闲连接线程释放周期时间 |
164 | 164 | shutdown-timeout: 1s #关闭超时 |
... | ... | @@ -177,12 +177,14 @@ mybatis-plus: |
177 | 177 | map-underscore-to-camel-case: true |
178 | 178 | auto-mapping-behavior: full |
179 | 179 | # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 |
180 | - #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | |
180 | + # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | |
181 | 181 | # 返回类型为Map,显示null对应的字段 |
182 | 182 | call-setters-on-nulls: true |
183 | 183 | #jeecg专用配置 |
184 | 184 | minidao: |
185 | 185 | base-package: org.jeecg.modules.jmreport.* |
186 | + #DB类型(mysql | postgresql | oracle | sqlserver| other) | |
187 | + db-type: mysql | |
186 | 188 | jeecg: |
187 | 189 | # 是否启用安全模式 |
188 | 190 | safeMode: false |
... | ... | @@ -190,15 +192,15 @@ jeecg: |
190 | 192 | signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a |
191 | 193 | # 本地:local\Minio:minio\阿里云:alioss |
192 | 194 | uploadType: local |
193 | - # 允许上传的文件类型,使用,分割 | |
194 | - uploadFileType: apk,txt,jpg,png | |
195 | + # 允许上传的文件类型 使用,分割 | |
196 | + uploadFileType: apk,txt,jpg,png,sh | |
195 | 197 | path: |
196 | 198 | #文件上传根目录 设置 |
197 | - upload: ./upload | |
199 | + upload: ./upFiles | |
198 | 200 | #webapp文件路径 |
199 | 201 | webapp: ./webapp |
200 | 202 | shiro: |
201 | - excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/sys/getWarehouseByUserCode,/test/test**,/api/**,/sys/cas/client/validateLogin,/sys/common/static/** | |
203 | + excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/sys/getWarehouseByUserCode,/api/**,/sys/cas/client/validateLogin,/sys/common/static/** | |
202 | 204 | #阿里云oss存储和大鱼短信秘钥配置 |
203 | 205 | oss: |
204 | 206 | accessKey: ?? |
... | ... | @@ -209,8 +211,8 @@ jeecg: |
209 | 211 | # ElasticSearch 设置 |
210 | 212 | elasticsearch: |
211 | 213 | cluster-name: jeecg-ES |
212 | - cluster-nodes: 127.0.0.1:9200 | |
213 | - check-enabled: true | |
214 | + cluster-nodes: 81.70.47.128:9200 | |
215 | + check-enabled: false | |
214 | 216 | # 表单设计器配置 |
215 | 217 | desform: |
216 | 218 | # 主题颜色(仅支持 16进制颜色代码) |
... | ... | @@ -230,7 +232,17 @@ jeecg: |
230 | 232 | bucketName: otatest |
231 | 233 | #大屏报表参数设置 |
232 | 234 | jmreport: |
233 | - mode: prod | |
235 | + # 打印纸张配置 title描述 size宽高 | |
236 | + printPaper: | |
237 | + - title: 条码双边打印机纸 | |
238 | + size: | |
239 | + - 60 | |
240 | + - 80 | |
241 | + - title: 物料双边打印机纸 | |
242 | + size: | |
243 | + - 85 | |
244 | + - 60 | |
245 | + mode: dev | |
234 | 246 | #数据字典是否进行saas数据隔离,自己看自己的字典 |
235 | 247 | saas: false |
236 | 248 | #是否需要校验token |
... | ... | @@ -261,8 +273,8 @@ jeecg: |
261 | 273 | data-type: database |
262 | 274 | #分布式锁配置 |
263 | 275 | redisson: |
264 | - address: 127.0.0.1:6379 | |
265 | - password: | |
276 | + address: 172.16.29.77:6379 | |
277 | + password: 123456 | |
266 | 278 | type: STANDALONE |
267 | 279 | enabled: true |
268 | 280 | #cas单点登录 |
... | ... | @@ -273,7 +285,7 @@ logging: |
273 | 285 | level: |
274 | 286 | org.jeecg.common: WARN |
275 | 287 | org.jeecg.modules: WARN |
276 | - org.jeecg.modules.wms: DEBUG | |
288 | + org.jeecg.modules.wms: INFO | |
277 | 289 | org.jeecg.config.shiro: ERROR |
278 | 290 | #swagger |
279 | 291 | knife4j: |
... | ... |
huaheng-wms-core/src/main/resources/logback-spring.xml
... | ... | @@ -71,10 +71,10 @@ |
71 | 71 | <!-- 每天生成一个html格式的日志结束 --> |
72 | 72 | |
73 | 73 | <!--myibatis log configure --> |
74 | -<!-- <logger name="com.apache.ibatis" level="TRACE" /> --> | |
75 | -<!-- <logger name="java.sql.Connection" level="DEBUG" /> --> | |
76 | -<!-- <logger name="java.sql.Statement" level="DEBUG" /> --> | |
77 | -<!-- <logger name="java.sql.PreparedStatement" level="DEBUG" /> --> | |
74 | + <logger name="com.apache.ibatis" level="TRACE" /> | |
75 | + <logger name="java.sql.Connection" level="INFO" /> | |
76 | + <logger name="java.sql.Statement" level="INFO" /> | |
77 | + <logger name="java.sql.PreparedStatement" level="INFO" /> | |
78 | 78 | |
79 | 79 | <logger name="jdbc.connection" additivity="false" level="off"> |
80 | 80 | <appender-ref ref="STDOUT" /> |
... | ... |