commit
79148db090
35 changed files with 3650 additions and 0 deletions
@ -0,0 +1,33 @@ |
|||
HELP.md |
|||
target/ |
|||
!.mvn/wrapper/maven-wrapper.jar |
|||
!**/src/main/**/target/ |
|||
!**/src/test/**/target/ |
|||
|
|||
### STS ### |
|||
.apt_generated |
|||
.classpath |
|||
.factorypath |
|||
.project |
|||
.settings |
|||
.springBeans |
|||
.sts4-cache |
|||
|
|||
### IntelliJ IDEA ### |
|||
.idea |
|||
*.iws |
|||
*.iml |
|||
*.ipr |
|||
|
|||
### NetBeans ### |
|||
/nbproject/private/ |
|||
/nbbuild/ |
|||
/dist/ |
|||
/nbdist/ |
|||
/.nb-gradle/ |
|||
build/ |
|||
!**/src/main/**/build/ |
|||
!**/src/test/**/build/ |
|||
|
|||
### VS Code ### |
|||
.vscode/ |
|||
Binary file not shown.
@ -0,0 +1,18 @@ |
|||
# Licensed to the Apache Software Foundation (ASF) under one |
|||
# or more contributor license agreements. See the NOTICE file |
|||
# distributed with this work for additional information |
|||
# regarding copyright ownership. The ASF licenses this file |
|||
# to you under the Apache License, Version 2.0 (the |
|||
# "License"); you may not use this file except in compliance |
|||
# with the License. You may obtain a copy of the License at |
|||
# |
|||
# https://www.apache.org/licenses/LICENSE-2.0 |
|||
# |
|||
# Unless required by applicable law or agreed to in writing, |
|||
# software distributed under the License is distributed on an |
|||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|||
# KIND, either express or implied. See the License for the |
|||
# specific language governing permissions and limitations |
|||
# under the License. |
|||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip |
|||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar |
|||
@ -0,0 +1,28 @@ |
|||
# 数据库服务器配置 |
|||
type=com.alibaba.druid.pool.DruidDataSource |
|||
druid.driver-class=dm.jdbc.driver.DmDriver |
|||
#druid.url=jdbc:mysql://10.14.1.197:3306/jiao_api_alpha_x?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 |
|||
#druid.username=jiao_api_alpha_x |
|||
#druid.password=YcpfGJyJpy6KfYR3 |
|||
|
|||
# local |
|||
druid.url=jdbc:dm://127.0.0.1:5236/CXY?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 |
|||
druid.username=SYSDBA |
|||
druid.password=SYSDBA |
|||
|
|||
# 正式环境服务器配置 |
|||
#druid.url=jdbc:mysql://10.24.4.162:33068/jiao_api_alpha_x?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 |
|||
#druid.username=jiao_api_alpha_x |
|||
#druid.password=YcpfGJyJpy6KfYR3 |
|||
|
|||
druid.initial-size=10 |
|||
druid.max-active=100 |
|||
druid.min-idle=10 |
|||
druid.max-wait=6000 |
|||
druid.pool-prepared-statements=true |
|||
druid.max-pool-prepared-statement-per-connection-size=20 |
|||
#druid.time-between-connect-error-millis=60000 |
|||
#druid.min-evictable-idle-time-millis=30000 |
|||
# 查看统计状态 |
|||
druid.stat-view-servlet.enabled=true |
|||
druid.stat-view-servlet.url-pattern=/druid/* |
|||
File diff suppressed because it is too large
@ -0,0 +1,120 @@ |
|||
2023-08-24 21:35:12.493 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 11836 (started by Administrator in D:\works\zhbs) |
|||
2023-08-24 21:35:12.494 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-24 21:35:13.288 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-24 21:35:13.365 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-24 21:35:13.388 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-0} closing ... |
|||
2023-08-24 21:35:13.399 [main] INFO o.s.b.a.l.ConditionEvaluationReportLoggingListener - |
|||
|
|||
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. |
|||
2023-08-24 21:36:20.030 [main] INFO com.xtong.zhbs.ZhbsApplication - Starting ZhbsApplication using Java 1.8.0_265 on PC-20230212EIRR with PID 20284 (D:\works\zhbs\target\classes started by Administrator in D:\works\zhbs) |
|||
2023-08-24 21:36:20.033 [main] INFO com.xtong.zhbs.ZhbsApplication - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-24 21:36:20.792 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 9099 (http) |
|||
2023-08-24 21:36:20.798 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-9099"] |
|||
2023-08-24 21:36:20.799 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] |
|||
2023-08-24 21:36:20.800 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.79] |
|||
2023-08-24 21:36:20.878 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext |
|||
2023-08-24 21:36:20.878 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 809 ms |
|||
2023-08-24 21:36:20.892 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-24 21:36:20.940 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-24 21:36:20.964 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-0} closing ... |
|||
2023-08-24 21:36:20.966 [main] INFO org.apache.catalina.core.StandardService - Stopping service [Tomcat] |
|||
2023-08-24 21:36:20.989 [main] INFO o.s.b.a.l.ConditionEvaluationReportLoggingListener - |
|||
|
|||
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. |
|||
2023-08-24 21:37:11.586 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 1420 (started by Administrator in D:\works\zhbs) |
|||
2023-08-24 21:37:11.587 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-24 21:37:12.420 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-24 21:37:12.493 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-24 21:37:12.514 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@5b78fdb1 |
|||
2023-08-24 21:37:13.496 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.329 seconds (JVM running for 3.166) |
|||
2023-08-24 21:37:13.808 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-24 21:37:13.812 [Druid-ConnectionPool-Create-593308118] INFO com.alibaba.druid.pool.DruidAbstractDataSource - {dataSource-1} failContinuous is true |
|||
2023-08-24 21:38:05.544 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 14332 (started by Administrator in D:\works\zhbs) |
|||
2023-08-24 21:38:05.545 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-24 21:38:06.308 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-24 21:38:06.378 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-24 21:38:06.402 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@16fe9c29 |
|||
2023-08-24 21:38:07.323 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.171 seconds (JVM running for 2.978) |
|||
2023-08-24 21:38:07.606 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-24 21:38:09.968 [Druid-ConnectionPool-Create-713707020] INFO com.alibaba.druid.pool.DruidAbstractDataSource - {dataSource-1} failContinuous is true |
|||
2023-08-24 21:38:28.288 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 6860 (started by Administrator in D:\works\zhbs) |
|||
2023-08-24 21:38:28.289 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-24 21:38:29.054 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-24 21:38:29.122 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-24 21:38:29.143 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@5b78fdb1 |
|||
2023-08-24 21:38:30.064 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.178 seconds (JVM running for 2.998) |
|||
2023-08-24 21:38:30.370 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-24 21:38:30.745 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-24 21:38:30.747 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-24 21:40:52.364 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 17920 (started by Administrator in D:\works\zhbs) |
|||
2023-08-24 21:40:52.366 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-24 21:40:53.148 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-24 21:40:53.211 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-24 21:40:53.238 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@5b78fdb1 |
|||
2023-08-24 21:40:54.205 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.246 seconds (JVM running for 3.075) |
|||
2023-08-24 21:40:54.497 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-24 21:40:54.857 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-24 21:40:54.859 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-24 21:41:18.979 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 5592 (started by Administrator in D:\works\zhbs) |
|||
2023-08-24 21:41:18.980 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-24 21:41:19.781 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-24 21:41:19.849 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-24 21:41:19.869 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@16fe9c29 |
|||
2023-08-24 21:41:20.787 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.212 seconds (JVM running for 3.009) |
|||
2023-08-24 21:41:21.074 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-24 21:41:21.450 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-24 21:41:21.452 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-24 21:42:27.706 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 1252 (started by Administrator in D:\works\zhbs) |
|||
2023-08-24 21:42:27.708 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-24 21:42:28.504 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-24 21:42:28.574 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-24 21:42:28.594 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@16fe9c29 |
|||
2023-08-24 21:42:29.506 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.211 seconds (JVM running for 3.025) |
|||
2023-08-24 21:42:29.805 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-24 21:42:30.181 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-24 21:42:30.184 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-24 21:49:09.213 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 15968 (started by Administrator in D:\works\zhbs) |
|||
2023-08-24 21:49:09.213 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-24 21:49:09.991 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-24 21:49:10.069 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-24 21:49:10.091 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@16fe9c29 |
|||
2023-08-24 21:49:11.000 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.189 seconds (JVM running for 3.006) |
|||
2023-08-24 21:49:11.284 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-24 21:49:11.658 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-24 21:49:11.661 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-24 21:49:50.776 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 8432 (started by Administrator in D:\works\zhbs) |
|||
2023-08-24 21:49:50.777 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-24 21:49:51.563 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-24 21:49:51.628 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-24 21:49:51.659 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@16fe9c29 |
|||
2023-08-24 21:49:52.574 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.205 seconds (JVM running for 3.051) |
|||
2023-08-24 21:49:52.887 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-24 21:49:53.268 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-24 21:49:53.271 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-24 21:52:23.342 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 1740 (started by Administrator in D:\works\zhbs) |
|||
2023-08-24 21:52:23.343 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-24 21:52:24.144 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-24 21:52:24.216 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-24 21:52:24.237 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@5b78fdb1 |
|||
2023-08-24 21:52:25.195 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.266 seconds (JVM running for 3.105) |
|||
2023-08-24 21:52:25.498 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-24 21:52:25.861 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-24 21:52:25.863 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-24 21:54:31.226 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 16640 (started by Administrator in D:\works\zhbs) |
|||
2023-08-24 21:54:31.227 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-24 21:54:32.011 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-24 21:54:32.090 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-24 21:54:32.110 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@16fe9c29 |
|||
2023-08-24 21:54:33.067 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.253 seconds (JVM running for 3.097) |
|||
2023-08-24 21:54:33.365 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-24 21:54:33.739 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-24 21:54:33.741 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-24 21:56:58.708 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 13012 (started by Administrator in D:\works\zhbs) |
|||
2023-08-24 21:56:58.709 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-24 21:56:59.486 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-24 21:56:59.558 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-24 21:56:59.579 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@16fe9c29 |
|||
2023-08-24 21:57:00.501 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.201 seconds (JVM running for 2.993) |
|||
2023-08-24 21:57:00.793 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-24 21:57:01.172 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-24 21:57:01.174 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
@ -0,0 +1,20 @@ |
|||
2023-08-25 08:50:55.397 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 08:51:28.307 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:01:04.696 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:04:11.380 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:09:53.860 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:14:19.216 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:21:21.449 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:23:18.222 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:35:12.258 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:37:41.809 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:38:10.915 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:38:35.652 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:39:30.345 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:39:45.906 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:42:11.494 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:42:34.965 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:43:46.028 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:58:40.129 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 09:59:19.993 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
2023-08-25 10:01:43.668 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set |
|||
@ -0,0 +1,180 @@ |
|||
2023-08-25 08:50:53.123 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 16216 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 08:50:53.126 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 08:50:53.975 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 08:50:54.053 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 08:50:54.076 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@7c974942 |
|||
2023-08-25 08:50:55.059 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.351 seconds (JVM running for 3.246) |
|||
2023-08-25 08:50:55.404 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 08:50:55.762 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 08:50:55.764 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 08:51:26.175 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 11316 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 08:51:26.177 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 08:51:26.975 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 08:51:27.049 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 08:51:27.075 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@4525d1d3 |
|||
2023-08-25 08:51:28.029 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.388 seconds (JVM running for 3.228) |
|||
2023-08-25 08:51:28.313 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 08:51:28.661 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 08:51:28.664 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:01:02.611 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 25824 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:01:02.612 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:01:03.384 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:01:03.455 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:01:03.476 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@4525d1d3 |
|||
2023-08-25 09:01:04.405 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.198 seconds (JVM running for 3.023) |
|||
2023-08-25 09:01:04.703 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:01:05.062 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:01:05.065 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:04:09.251 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 20052 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:04:09.252 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:04:10.050 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:04:10.121 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:04:10.142 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@11653e3b |
|||
2023-08-25 09:04:11.085 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.251 seconds (JVM running for 3.076) |
|||
2023-08-25 09:04:11.386 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:04:11.763 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:04:11.766 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:09:51.621 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 20488 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:09:51.622 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:09:52.442 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:09:52.510 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:09:52.541 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@4525d1d3 |
|||
2023-08-25 09:09:53.557 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.38 seconds (JVM running for 3.226) |
|||
2023-08-25 09:09:53.875 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:09:54.242 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:09:54.244 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:14:17.004 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 22432 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:14:17.006 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:14:17.832 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:14:17.910 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:14:17.934 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@11653e3b |
|||
2023-08-25 09:14:18.921 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.378 seconds (JVM running for 3.269) |
|||
2023-08-25 09:14:19.222 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:14:19.605 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:14:19.607 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:21:19.407 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 25876 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:21:19.408 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:21:20.169 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:21:20.240 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:21:20.261 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@11653e3b |
|||
2023-08-25 09:21:21.170 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.158 seconds (JVM running for 2.955) |
|||
2023-08-25 09:21:21.454 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:21:21.820 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:21:21.822 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:23:16.106 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 13908 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:23:16.107 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:23:16.892 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:23:16.961 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:23:16.982 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@4525d1d3 |
|||
2023-08-25 09:23:17.936 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.229 seconds (JVM running for 3.059) |
|||
2023-08-25 09:23:18.228 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:23:18.585 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:23:18.586 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:35:10.119 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 22416 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:35:10.120 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:35:10.916 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:35:10.983 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:35:11.011 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@682c1e93 |
|||
2023-08-25 09:35:11.983 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.279 seconds (JVM running for 3.117) |
|||
2023-08-25 09:35:12.264 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:35:12.639 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:35:12.642 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:37:39.759 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 13032 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:37:39.760 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:37:40.539 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:37:40.610 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:37:40.632 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@4525d1d3 |
|||
2023-08-25 09:37:41.544 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.218 seconds (JVM running for 3.022) |
|||
2023-08-25 09:37:41.815 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:37:42.169 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:37:42.172 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:38:08.831 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 12728 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:38:08.832 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:38:09.622 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:38:09.693 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:38:09.715 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@4525d1d3 |
|||
2023-08-25 09:38:10.634 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.198 seconds (JVM running for 3.007) |
|||
2023-08-25 09:38:10.921 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:38:11.251 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:38:11.253 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:38:33.589 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 16344 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:38:33.590 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:38:34.355 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:38:34.429 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:38:34.451 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@4525d1d3 |
|||
2023-08-25 09:38:35.374 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.171 seconds (JVM running for 2.96) |
|||
2023-08-25 09:38:35.664 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:38:36.025 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:38:36.027 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:39:28.265 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 25596 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:39:28.266 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:39:29.041 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:39:29.106 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:39:29.135 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@4525d1d3 |
|||
2023-08-25 09:39:30.056 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.187 seconds (JVM running for 2.979) |
|||
2023-08-25 09:39:30.357 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:39:30.707 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:39:30.709 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:39:43.862 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 7072 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:39:43.864 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:39:44.630 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:39:44.700 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:39:44.722 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@11653e3b |
|||
2023-08-25 09:39:45.625 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.149 seconds (JVM running for 2.959) |
|||
2023-08-25 09:39:45.913 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:39:46.271 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:39:46.273 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:42:09.259 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 6560 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:42:09.260 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:42:10.085 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:42:10.164 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:42:10.186 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@11653e3b |
|||
2023-08-25 09:42:11.189 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.361 seconds (JVM running for 3.221) |
|||
2023-08-25 09:42:11.501 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:42:11.895 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:42:11.898 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:42:32.735 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 26640 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:42:32.736 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:42:33.583 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:42:33.660 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:42:33.683 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@4525d1d3 |
|||
2023-08-25 09:42:34.656 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.342 seconds (JVM running for 3.219) |
|||
2023-08-25 09:42:34.971 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:42:35.311 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:42:35.314 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:43:43.820 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 9140 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:43:43.821 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:43:44.641 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:43:44.716 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:43:44.743 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@4525d1d3 |
|||
2023-08-25 09:43:45.717 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.335 seconds (JVM running for 3.192) |
|||
2023-08-25 09:43:46.034 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:43:46.371 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:43:46.373 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:58:38.051 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 4496 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:58:38.052 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:58:38.830 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:58:38.892 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:58:38.921 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@4525d1d3 |
|||
2023-08-25 09:58:39.856 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.229 seconds (JVM running for 3.058) |
|||
2023-08-25 09:58:40.136 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:58:40.486 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:58:40.488 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 09:59:17.924 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 23628 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 09:59:17.925 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 09:59:18.707 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 09:59:18.779 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 09:59:18.799 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@11653e3b |
|||
2023-08-25 09:59:19.715 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.204 seconds (JVM running for 3.02) |
|||
2023-08-25 09:59:19.998 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 09:59:20.368 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 09:59:20.371 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
2023-08-25 10:01:41.572 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Starting PassengerFlowMapperTest using Java 1.8.0_265 on PC-20230212EIRR with PID 18156 (started by Administrator in D:\works\zhbs) |
|||
2023-08-25 10:01:41.574 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - No active profile set, falling back to 1 default profile: "default" |
|||
2023-08-25 10:01:42.354 [main] INFO com.xtong.zhbs.configure.DruidConfig - master druid:D:\works\zhbs/conf/db.properties |
|||
2023-08-25 10:01:42.427 [main] INFO com.xtong.zhbs.configure.DruidConfig - druid监控配置:statViewServlet urls=[/druid/*] |
|||
2023-08-25 10:01:42.446 [main] INFO com.xtong.zhbs.configure.DruidConfig - chSqlSessionFactoryorg.mybatis.spring.SqlSessionFactoryBean@11653e3b |
|||
2023-08-25 10:01:43.382 [main] INFO com.xtong.zhbs.mapper.PassengerFlowMapperTest - Started PassengerFlowMapperTest in 2.236 seconds (JVM running for 3.068) |
|||
2023-08-25 10:01:43.673 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited |
|||
2023-08-25 10:01:44.002 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... |
|||
2023-08-25 10:01:44.004 [SpringApplicationShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed |
|||
@ -0,0 +1,2 @@ |
|||
2023-08-24 21:35:13.387 [main] WARN o.s.w.context.support.GenericWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'chSqlSessionFactory' defined in class path resource [com/xtong/zhbs/configure/DruidConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'chSqlSessionFactory' threw exception; nested exception is java.io.FileNotFoundException: class path resource [mapper/zhbs/] cannot be resolved to URL because it does not exist |
|||
2023-08-24 21:36:20.964 [main] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'chSqlSessionFactory' defined in class path resource [com/xtong/zhbs/configure/DruidConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'chSqlSessionFactory' threw exception; nested exception is java.io.FileNotFoundException: class path resource [mapper/zhbs/] cannot be resolved to URL because it does not exist |
|||
@ -0,0 +1,316 @@ |
|||
#!/bin/sh |
|||
# ---------------------------------------------------------------------------- |
|||
# Licensed to the Apache Software Foundation (ASF) under one |
|||
# or more contributor license agreements. See the NOTICE file |
|||
# distributed with this work for additional information |
|||
# regarding copyright ownership. The ASF licenses this file |
|||
# to you under the Apache License, Version 2.0 (the |
|||
# "License"); you may not use this file except in compliance |
|||
# with the License. You may obtain a copy of the License at |
|||
# |
|||
# https://www.apache.org/licenses/LICENSE-2.0 |
|||
# |
|||
# Unless required by applicable law or agreed to in writing, |
|||
# software distributed under the License is distributed on an |
|||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|||
# KIND, either express or implied. See the License for the |
|||
# specific language governing permissions and limitations |
|||
# under the License. |
|||
# ---------------------------------------------------------------------------- |
|||
|
|||
# ---------------------------------------------------------------------------- |
|||
# Maven Start Up Batch script |
|||
# |
|||
# Required ENV vars: |
|||
# ------------------ |
|||
# JAVA_HOME - location of a JDK home dir |
|||
# |
|||
# Optional ENV vars |
|||
# ----------------- |
|||
# M2_HOME - location of maven2's installed home dir |
|||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven |
|||
# e.g. to debug Maven itself, use |
|||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 |
|||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files |
|||
# ---------------------------------------------------------------------------- |
|||
|
|||
if [ -z "$MAVEN_SKIP_RC" ] ; then |
|||
|
|||
if [ -f /usr/local/etc/mavenrc ] ; then |
|||
. /usr/local/etc/mavenrc |
|||
fi |
|||
|
|||
if [ -f /etc/mavenrc ] ; then |
|||
. /etc/mavenrc |
|||
fi |
|||
|
|||
if [ -f "$HOME/.mavenrc" ] ; then |
|||
. "$HOME/.mavenrc" |
|||
fi |
|||
|
|||
fi |
|||
|
|||
# OS specific support. $var _must_ be set to either true or false. |
|||
cygwin=false; |
|||
darwin=false; |
|||
mingw=false |
|||
case "`uname`" in |
|||
CYGWIN*) cygwin=true ;; |
|||
MINGW*) mingw=true;; |
|||
Darwin*) darwin=true |
|||
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home |
|||
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html |
|||
if [ -z "$JAVA_HOME" ]; then |
|||
if [ -x "/usr/libexec/java_home" ]; then |
|||
export JAVA_HOME="`/usr/libexec/java_home`" |
|||
else |
|||
export JAVA_HOME="/Library/Java/Home" |
|||
fi |
|||
fi |
|||
;; |
|||
esac |
|||
|
|||
if [ -z "$JAVA_HOME" ] ; then |
|||
if [ -r /etc/gentoo-release ] ; then |
|||
JAVA_HOME=`java-config --jre-home` |
|||
fi |
|||
fi |
|||
|
|||
if [ -z "$M2_HOME" ] ; then |
|||
## resolve links - $0 may be a link to maven's home |
|||
PRG="$0" |
|||
|
|||
# need this for relative symlinks |
|||
while [ -h "$PRG" ] ; do |
|||
ls=`ls -ld "$PRG"` |
|||
link=`expr "$ls" : '.*-> \(.*\)$'` |
|||
if expr "$link" : '/.*' > /dev/null; then |
|||
PRG="$link" |
|||
else |
|||
PRG="`dirname "$PRG"`/$link" |
|||
fi |
|||
done |
|||
|
|||
saveddir=`pwd` |
|||
|
|||
M2_HOME=`dirname "$PRG"`/.. |
|||
|
|||
# make it fully qualified |
|||
M2_HOME=`cd "$M2_HOME" && pwd` |
|||
|
|||
cd "$saveddir" |
|||
# echo Using m2 at $M2_HOME |
|||
fi |
|||
|
|||
# For Cygwin, ensure paths are in UNIX format before anything is touched |
|||
if $cygwin ; then |
|||
[ -n "$M2_HOME" ] && |
|||
M2_HOME=`cygpath --unix "$M2_HOME"` |
|||
[ -n "$JAVA_HOME" ] && |
|||
JAVA_HOME=`cygpath --unix "$JAVA_HOME"` |
|||
[ -n "$CLASSPATH" ] && |
|||
CLASSPATH=`cygpath --path --unix "$CLASSPATH"` |
|||
fi |
|||
|
|||
# For Mingw, ensure paths are in UNIX format before anything is touched |
|||
if $mingw ; then |
|||
[ -n "$M2_HOME" ] && |
|||
M2_HOME="`(cd "$M2_HOME"; pwd)`" |
|||
[ -n "$JAVA_HOME" ] && |
|||
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" |
|||
fi |
|||
|
|||
if [ -z "$JAVA_HOME" ]; then |
|||
javaExecutable="`which javac`" |
|||
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then |
|||
# readlink(1) is not available as standard on Solaris 10. |
|||
readLink=`which readlink` |
|||
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then |
|||
if $darwin ; then |
|||
javaHome="`dirname \"$javaExecutable\"`" |
|||
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" |
|||
else |
|||
javaExecutable="`readlink -f \"$javaExecutable\"`" |
|||
fi |
|||
javaHome="`dirname \"$javaExecutable\"`" |
|||
javaHome=`expr "$javaHome" : '\(.*\)/bin'` |
|||
JAVA_HOME="$javaHome" |
|||
export JAVA_HOME |
|||
fi |
|||
fi |
|||
fi |
|||
|
|||
if [ -z "$JAVACMD" ] ; then |
|||
if [ -n "$JAVA_HOME" ] ; then |
|||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then |
|||
# IBM's JDK on AIX uses strange locations for the executables |
|||
JAVACMD="$JAVA_HOME/jre/sh/java" |
|||
else |
|||
JAVACMD="$JAVA_HOME/bin/java" |
|||
fi |
|||
else |
|||
JAVACMD="`\\unset -f command; \\command -v java`" |
|||
fi |
|||
fi |
|||
|
|||
if [ ! -x "$JAVACMD" ] ; then |
|||
echo "Error: JAVA_HOME is not defined correctly." >&2 |
|||
echo " We cannot execute $JAVACMD" >&2 |
|||
exit 1 |
|||
fi |
|||
|
|||
if [ -z "$JAVA_HOME" ] ; then |
|||
echo "Warning: JAVA_HOME environment variable is not set." |
|||
fi |
|||
|
|||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher |
|||
|
|||
# traverses directory structure from process work directory to filesystem root |
|||
# first directory with .mvn subdirectory is considered project base directory |
|||
find_maven_basedir() { |
|||
|
|||
if [ -z "$1" ] |
|||
then |
|||
echo "Path not specified to find_maven_basedir" |
|||
return 1 |
|||
fi |
|||
|
|||
basedir="$1" |
|||
wdir="$1" |
|||
while [ "$wdir" != '/' ] ; do |
|||
if [ -d "$wdir"/.mvn ] ; then |
|||
basedir=$wdir |
|||
break |
|||
fi |
|||
# workaround for JBEAP-8937 (on Solaris 10/Sparc) |
|||
if [ -d "${wdir}" ]; then |
|||
wdir=`cd "$wdir/.."; pwd` |
|||
fi |
|||
# end of workaround |
|||
done |
|||
echo "${basedir}" |
|||
} |
|||
|
|||
# concatenates all lines of a file |
|||
concat_lines() { |
|||
if [ -f "$1" ]; then |
|||
echo "$(tr -s '\n' ' ' < "$1")" |
|||
fi |
|||
} |
|||
|
|||
BASE_DIR=`find_maven_basedir "$(pwd)"` |
|||
if [ -z "$BASE_DIR" ]; then |
|||
exit 1; |
|||
fi |
|||
|
|||
########################################################################################## |
|||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
|||
# This allows using the maven wrapper in projects that prohibit checking in binary data. |
|||
########################################################################################## |
|||
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Found .mvn/wrapper/maven-wrapper.jar" |
|||
fi |
|||
else |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." |
|||
fi |
|||
if [ -n "$MVNW_REPOURL" ]; then |
|||
jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" |
|||
else |
|||
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" |
|||
fi |
|||
while IFS="=" read key value; do |
|||
case "$key" in (wrapperUrl) jarUrl="$value"; break ;; |
|||
esac |
|||
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Downloading from: $jarUrl" |
|||
fi |
|||
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" |
|||
if $cygwin; then |
|||
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` |
|||
fi |
|||
|
|||
if command -v wget > /dev/null; then |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Found wget ... using wget" |
|||
fi |
|||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then |
|||
wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" |
|||
else |
|||
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" |
|||
fi |
|||
elif command -v curl > /dev/null; then |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Found curl ... using curl" |
|||
fi |
|||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then |
|||
curl -o "$wrapperJarPath" "$jarUrl" -f |
|||
else |
|||
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f |
|||
fi |
|||
|
|||
else |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Falling back to using Java to download" |
|||
fi |
|||
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" |
|||
# For Cygwin, switch paths to Windows format before running javac |
|||
if $cygwin; then |
|||
javaClass=`cygpath --path --windows "$javaClass"` |
|||
fi |
|||
if [ -e "$javaClass" ]; then |
|||
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo " - Compiling MavenWrapperDownloader.java ..." |
|||
fi |
|||
# Compiling the Java class |
|||
("$JAVA_HOME/bin/javac" "$javaClass") |
|||
fi |
|||
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then |
|||
# Running the downloader |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo " - Running MavenWrapperDownloader.java ..." |
|||
fi |
|||
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") |
|||
fi |
|||
fi |
|||
fi |
|||
fi |
|||
########################################################################################## |
|||
# End of extension |
|||
########################################################################################## |
|||
|
|||
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo $MAVEN_PROJECTBASEDIR |
|||
fi |
|||
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" |
|||
|
|||
# For Cygwin, switch paths to Windows format before running java |
|||
if $cygwin; then |
|||
[ -n "$M2_HOME" ] && |
|||
M2_HOME=`cygpath --path --windows "$M2_HOME"` |
|||
[ -n "$JAVA_HOME" ] && |
|||
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` |
|||
[ -n "$CLASSPATH" ] && |
|||
CLASSPATH=`cygpath --path --windows "$CLASSPATH"` |
|||
[ -n "$MAVEN_PROJECTBASEDIR" ] && |
|||
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` |
|||
fi |
|||
|
|||
# Provide a "standardized" way to retrieve the CLI args that will |
|||
# work with both Windows and non-Windows executions. |
|||
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" |
|||
export MAVEN_CMD_LINE_ARGS |
|||
|
|||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain |
|||
|
|||
exec "$JAVACMD" \ |
|||
$MAVEN_OPTS \ |
|||
$MAVEN_DEBUG_OPTS \ |
|||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ |
|||
"-Dmaven.home=${M2_HOME}" \ |
|||
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ |
|||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" |
|||
@ -0,0 +1,188 @@ |
|||
@REM ---------------------------------------------------------------------------- |
|||
@REM Licensed to the Apache Software Foundation (ASF) under one |
|||
@REM or more contributor license agreements. See the NOTICE file |
|||
@REM distributed with this work for additional information |
|||
@REM regarding copyright ownership. The ASF licenses this file |
|||
@REM to you under the Apache License, Version 2.0 (the |
|||
@REM "License"); you may not use this file except in compliance |
|||
@REM with the License. You may obtain a copy of the License at |
|||
@REM |
|||
@REM https://www.apache.org/licenses/LICENSE-2.0 |
|||
@REM |
|||
@REM Unless required by applicable law or agreed to in writing, |
|||
@REM software distributed under the License is distributed on an |
|||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|||
@REM KIND, either express or implied. See the License for the |
|||
@REM specific language governing permissions and limitations |
|||
@REM under the License. |
|||
@REM ---------------------------------------------------------------------------- |
|||
|
|||
@REM ---------------------------------------------------------------------------- |
|||
@REM Maven Start Up Batch script |
|||
@REM |
|||
@REM Required ENV vars: |
|||
@REM JAVA_HOME - location of a JDK home dir |
|||
@REM |
|||
@REM Optional ENV vars |
|||
@REM M2_HOME - location of maven2's installed home dir |
|||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands |
|||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending |
|||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven |
|||
@REM e.g. to debug Maven itself, use |
|||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 |
|||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files |
|||
@REM ---------------------------------------------------------------------------- |
|||
|
|||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' |
|||
@echo off |
|||
@REM set title of command window |
|||
title %0 |
|||
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' |
|||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% |
|||
|
|||
@REM set %HOME% to equivalent of $HOME |
|||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") |
|||
|
|||
@REM Execute a user defined script before this one |
|||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre |
|||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending |
|||
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* |
|||
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* |
|||
:skipRcPre |
|||
|
|||
@setlocal |
|||
|
|||
set ERROR_CODE=0 |
|||
|
|||
@REM To isolate internal variables from possible post scripts, we use another setlocal |
|||
@setlocal |
|||
|
|||
@REM ==== START VALIDATION ==== |
|||
if not "%JAVA_HOME%" == "" goto OkJHome |
|||
|
|||
echo. |
|||
echo Error: JAVA_HOME not found in your environment. >&2 |
|||
echo Please set the JAVA_HOME variable in your environment to match the >&2 |
|||
echo location of your Java installation. >&2 |
|||
echo. |
|||
goto error |
|||
|
|||
:OkJHome |
|||
if exist "%JAVA_HOME%\bin\java.exe" goto init |
|||
|
|||
echo. |
|||
echo Error: JAVA_HOME is set to an invalid directory. >&2 |
|||
echo JAVA_HOME = "%JAVA_HOME%" >&2 |
|||
echo Please set the JAVA_HOME variable in your environment to match the >&2 |
|||
echo location of your Java installation. >&2 |
|||
echo. |
|||
goto error |
|||
|
|||
@REM ==== END VALIDATION ==== |
|||
|
|||
:init |
|||
|
|||
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". |
|||
@REM Fallback to current working directory if not found. |
|||
|
|||
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% |
|||
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir |
|||
|
|||
set EXEC_DIR=%CD% |
|||
set WDIR=%EXEC_DIR% |
|||
:findBaseDir |
|||
IF EXIST "%WDIR%"\.mvn goto baseDirFound |
|||
cd .. |
|||
IF "%WDIR%"=="%CD%" goto baseDirNotFound |
|||
set WDIR=%CD% |
|||
goto findBaseDir |
|||
|
|||
:baseDirFound |
|||
set MAVEN_PROJECTBASEDIR=%WDIR% |
|||
cd "%EXEC_DIR%" |
|||
goto endDetectBaseDir |
|||
|
|||
:baseDirNotFound |
|||
set MAVEN_PROJECTBASEDIR=%EXEC_DIR% |
|||
cd "%EXEC_DIR%" |
|||
|
|||
:endDetectBaseDir |
|||
|
|||
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig |
|||
|
|||
@setlocal EnableExtensions EnableDelayedExpansion |
|||
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a |
|||
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% |
|||
|
|||
:endReadAdditionalConfig |
|||
|
|||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" |
|||
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" |
|||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain |
|||
|
|||
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" |
|||
|
|||
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( |
|||
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B |
|||
) |
|||
|
|||
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
|||
@REM This allows using the maven wrapper in projects that prohibit checking in binary data. |
|||
if exist %WRAPPER_JAR% ( |
|||
if "%MVNW_VERBOSE%" == "true" ( |
|||
echo Found %WRAPPER_JAR% |
|||
) |
|||
) else ( |
|||
if not "%MVNW_REPOURL%" == "" ( |
|||
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" |
|||
) |
|||
if "%MVNW_VERBOSE%" == "true" ( |
|||
echo Couldn't find %WRAPPER_JAR%, downloading it ... |
|||
echo Downloading from: %DOWNLOAD_URL% |
|||
) |
|||
|
|||
powershell -Command "&{"^ |
|||
"$webclient = new-object System.Net.WebClient;"^ |
|||
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ |
|||
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ |
|||
"}"^ |
|||
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ |
|||
"}" |
|||
if "%MVNW_VERBOSE%" == "true" ( |
|||
echo Finished downloading %WRAPPER_JAR% |
|||
) |
|||
) |
|||
@REM End of extension |
|||
|
|||
@REM Provide a "standardized" way to retrieve the CLI args that will |
|||
@REM work with both Windows and non-Windows executions. |
|||
set MAVEN_CMD_LINE_ARGS=%* |
|||
|
|||
%MAVEN_JAVA_EXE% ^ |
|||
%JVM_CONFIG_MAVEN_PROPS% ^ |
|||
%MAVEN_OPTS% ^ |
|||
%MAVEN_DEBUG_OPTS% ^ |
|||
-classpath %WRAPPER_JAR% ^ |
|||
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ |
|||
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* |
|||
if ERRORLEVEL 1 goto error |
|||
goto end |
|||
|
|||
:error |
|||
set ERROR_CODE=1 |
|||
|
|||
:end |
|||
@endlocal & set ERROR_CODE=%ERROR_CODE% |
|||
|
|||
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost |
|||
@REM check for post script, once with legacy .bat ending and once with .cmd ending |
|||
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" |
|||
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" |
|||
:skipRcPost |
|||
|
|||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' |
|||
if "%MAVEN_BATCH_PAUSE%"=="on" pause |
|||
|
|||
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% |
|||
|
|||
cmd /C exit /B %ERROR_CODE% |
|||
@ -0,0 +1,104 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<parent> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-parent</artifactId> |
|||
<version>2.7.15</version> |
|||
<relativePath/> <!-- lookup parent from repository --> |
|||
</parent> |
|||
<groupId>com.xtong</groupId> |
|||
<artifactId>zhbs</artifactId> |
|||
<version>0.0.1-SNAPSHOT</version> |
|||
<name>zhbs</name> |
|||
<description>智慧大屏</description> |
|||
<properties> |
|||
<java.version>1.8</java.version> |
|||
</properties> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-web</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-websocket</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.mybatis.spring.boot</groupId> |
|||
<artifactId>mybatis-spring-boot-starter</artifactId> |
|||
<version>2.3.1</version> |
|||
</dependency> |
|||
|
|||
<!--达梦数据库驱动 START--> |
|||
<dependency> |
|||
<groupId>com.dameng</groupId> |
|||
<artifactId>DmJdbcDriver18</artifactId> |
|||
<version>8.1.1.193</version> |
|||
</dependency> |
|||
<!--达梦数据库驱动 END--> |
|||
<!-- druid start--> |
|||
<dependency> |
|||
<groupId>com.alibaba</groupId> |
|||
<artifactId>druid</artifactId> |
|||
<version>1.2.8</version> |
|||
</dependency> |
|||
<!-- druid end--> |
|||
<!-- common --> |
|||
<dependency> |
|||
<groupId>commons-codec</groupId> |
|||
<artifactId>commons-codec</artifactId> |
|||
<version>1.15</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.apache.commons</groupId> |
|||
<artifactId>commons-lang3</artifactId> |
|||
<version>3.12.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>commons-lang</groupId> |
|||
<artifactId>commons-lang</artifactId> |
|||
<version>2.6</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>commons-logging</groupId> |
|||
<artifactId>commons-logging</artifactId> |
|||
<version>1.2</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>commons-io</groupId> |
|||
<artifactId>commons-io</artifactId> |
|||
<version>2.6</version> |
|||
</dependency> |
|||
|
|||
<!-- junit--> |
|||
<dependency> |
|||
<groupId>junit</groupId> |
|||
<artifactId>junit</artifactId> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-test</artifactId> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.mybatis.spring.boot</groupId> |
|||
<artifactId>mybatis-spring-boot-starter-test</artifactId> |
|||
<version>2.3.1</version> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
|
|||
</project> |
|||
@ -0,0 +1,58 @@ |
|||
package com.xtong.zhbs.Interceptor; |
|||
|
|||
|
|||
import com.xtong.zhbs.exception.ChException; |
|||
import org.apache.commons.lang.StringUtils; |
|||
import org.apache.commons.logging.Log; |
|||
import org.apache.commons.logging.LogFactory; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.web.method.HandlerMethod; |
|||
import org.springframework.web.servlet.HandlerInterceptor; |
|||
import org.springframework.web.servlet.ModelAndView; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.lang.reflect.Method; |
|||
|
|||
@Component |
|||
public class ChInterceptor implements HandlerInterceptor { |
|||
private static Log log = LogFactory.getLog(ChInterceptor.class); |
|||
|
|||
@Override |
|||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { |
|||
String uri = request.getRequestURI(); |
|||
// 判断是否是数据库监控的
|
|||
if (uri.contains("/druid/**") || uri.contains("/api/**")) { |
|||
return true; |
|||
} |
|||
// 从请求头中获取token
|
|||
String token = request.getHeader("token"); |
|||
// 如果不是映射到方法直接通过
|
|||
if (!(handler instanceof HandlerMethod)) { |
|||
return true; |
|||
} |
|||
HandlerMethod handlerMethod = (HandlerMethod) handler; |
|||
Method method = handlerMethod.getMethod(); |
|||
log.info("method:"+method); |
|||
// 执行认证
|
|||
if (token == null || StringUtils.isBlank(token)) { |
|||
throw new ChException("token为空,token为必须参数"); |
|||
} else { |
|||
log.info("token正常"); |
|||
} |
|||
log.info("token:" + token); |
|||
// other code
|
|||
return true; |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { |
|||
// 拦截post
|
|||
} |
|||
|
|||
@Override |
|||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { |
|||
// 完成后的请求
|
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
package com.xtong.zhbs; |
|||
|
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
|
|||
@SpringBootApplication |
|||
public class ZhbsApplication { |
|||
|
|||
public static void main(String[] args) { |
|||
SpringApplication.run(ZhbsApplication.class, args); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,56 @@ |
|||
package com.xtong.zhbs.bean; |
|||
|
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 客流统计 |
|||
*/ |
|||
@Component |
|||
public class PassengerFlow { |
|||
private Integer id; |
|||
private String groupId; |
|||
private String groupName; |
|||
private Integer flowInNum; |
|||
private Integer flowOutNum; |
|||
//
|
|||
|
|||
public Integer getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Integer id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getGroupId() { |
|||
return groupId; |
|||
} |
|||
|
|||
public void setGroupId(String groupId) { |
|||
this.groupId = groupId; |
|||
} |
|||
|
|||
public String getGroupName() { |
|||
return groupName; |
|||
} |
|||
|
|||
public void setGroupName(String groupName) { |
|||
this.groupName = groupName; |
|||
} |
|||
|
|||
public Integer getFlowInNum() { |
|||
return flowInNum; |
|||
} |
|||
|
|||
public void setFlowInNum(Integer flowInNum) { |
|||
this.flowInNum = flowInNum; |
|||
} |
|||
|
|||
public Integer getFlowOutNum() { |
|||
return flowOutNum; |
|||
} |
|||
|
|||
public void setFlowOutNum(Integer flowOutNum) { |
|||
this.flowOutNum = flowOutNum; |
|||
} |
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
package com.xtong.zhbs.configure; |
|||
|
|||
import com.xtong.zhbs.Interceptor.ChInterceptor; |
|||
import org.apache.commons.logging.Log; |
|||
import org.apache.commons.logging.LogFactory; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.web.servlet.config.annotation.CorsRegistry; |
|||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
|||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
|||
|
|||
/** |
|||
* 配置基础信息 |
|||
*/ |
|||
@Configuration |
|||
public class ChWebMvcConfigurer implements WebMvcConfigurer { |
|||
//日志初始化
|
|||
private static Log log = LogFactory.getLog(ChWebMvcConfigurer.class); |
|||
/** |
|||
* 注册拦截器 |
|||
* @param registry |
|||
*/ |
|||
@Override |
|||
public void addInterceptors(InterceptorRegistry registry) { |
|||
registry.addInterceptor(new ChInterceptor()).addPathPatterns("/admin/**"); |
|||
log.debug("拦截器注册:"+registry.toString()); |
|||
} |
|||
|
|||
@Override |
|||
public void addCorsMappings(CorsRegistry registry){ |
|||
registry.addMapping("/**") |
|||
.allowedMethods("POST","GET"); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,115 @@ |
|||
package com.xtong.zhbs.configure; |
|||
|
|||
|
|||
import com.alibaba.druid.pool.DruidDataSource; |
|||
import com.alibaba.druid.support.http.StatViewServlet; |
|||
import com.alibaba.druid.support.http.WebStatFilter; |
|||
import com.xtong.zhbs.constant.ChConstant; |
|||
import org.apache.commons.logging.Log; |
|||
import org.apache.commons.logging.LogFactory; |
|||
import org.apache.ibatis.session.SqlSessionFactory; |
|||
import org.mybatis.spring.SqlSessionFactoryBean; |
|||
import org.mybatis.spring.SqlSessionTemplate; |
|||
import org.mybatis.spring.annotation.MapperScan; |
|||
import org.springframework.beans.factory.annotation.Qualifier; |
|||
import org.springframework.boot.web.servlet.FilterRegistrationBean; |
|||
import org.springframework.boot.web.servlet.ServletRegistrationBean; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver; |
|||
import org.springframework.jdbc.datasource.DataSourceTransactionManager; |
|||
|
|||
import javax.servlet.Filter; |
|||
import javax.servlet.Servlet; |
|||
import javax.sql.DataSource; |
|||
import java.io.FileReader; |
|||
import java.util.Properties; |
|||
|
|||
|
|||
/** |
|||
* druid 数据库链接配置 |
|||
* 涉及多数据源,此处需要明确指定扫描包的位置 |
|||
*/ |
|||
@Configuration |
|||
@MapperScan(basePackages = {"com.xtong.*.mapper"},sqlSessionFactoryRef = "chSqlSessionFactory") |
|||
public class DruidConfig { |
|||
private Log log = LogFactory.getLog(DruidConfig.class); //初始化日志
|
|||
static final String CHMAPPER_LOCATION = "classpath:mapper/zhbs/*.xml"; |
|||
|
|||
/** |
|||
* 配置为主要数据源 |
|||
* @return |
|||
* @throws Exception |
|||
*/ |
|||
|
|||
@Bean(name = "chDataSource") |
|||
@Qualifier("chDataSource") |
|||
public DataSource druidDataSource() throws Exception{ |
|||
//配置文件的真实路径
|
|||
String dbconf = ChConstant.WORK_DIR + ChConstant.DB_CONF; |
|||
Properties prop = new Properties(); |
|||
prop.load(new FileReader(dbconf)); |
|||
log.info("master druid:"+dbconf); |
|||
//使用datasource方式
|
|||
DruidDataSource dataSource = new DruidDataSource(); |
|||
String dburl = prop.getProperty("druid.url"); |
|||
dataSource.setUrl(dburl); |
|||
dataSource.setDriverClassName(prop.getProperty("druid.driver-class")); |
|||
dataSource.setUsername(prop.getProperty("druid.username")); |
|||
dataSource.setPassword(prop.getProperty("druid.password")); |
|||
|
|||
return dataSource; |
|||
} |
|||
|
|||
|
|||
@Bean |
|||
public ServletRegistrationBean<Servlet> druidServlet() { |
|||
// 进行 druid 监控的配置处理
|
|||
ServletRegistrationBean<Servlet> srb = new ServletRegistrationBean<>(new StatViewServlet(), "/druid/*"); |
|||
// 白名单
|
|||
srb.addInitParameter("allow", "127.0.0.1"); |
|||
// 黑名单
|
|||
//srb.addInitParameter("deny", "192.168.31.253");
|
|||
// 用户名
|
|||
srb.addInitParameter("loginUsername", "root"); |
|||
// 密码
|
|||
srb.addInitParameter("loginPassword", "xc1123"); |
|||
// 是否可以重置数据源
|
|||
srb.addInitParameter("resetEnable", "false"); |
|||
log.info("druid监控配置:" + srb); |
|||
return srb; |
|||
} |
|||
|
|||
@Bean |
|||
public FilterRegistrationBean<Filter> filterRegistrationBean() { |
|||
FilterRegistrationBean<Filter> frb = new FilterRegistrationBean<>(); |
|||
frb.setFilter(new WebStatFilter()); |
|||
// 所有请求进行监控处理
|
|||
frb.addUrlPatterns("/*"); |
|||
// 排除名单
|
|||
frb.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.css,/druid/*"); |
|||
return frb; |
|||
} |
|||
|
|||
|
|||
@Bean(name="chSqlSessionFactory") |
|||
public SqlSessionFactory chSqlSessionFactory(@Qualifier("chDataSource") DataSource dataSource) throws Exception { |
|||
SqlSessionFactoryBean bean=new SqlSessionFactoryBean(); |
|||
bean.setDataSource(dataSource); |
|||
bean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(DruidConfig.CHMAPPER_LOCATION)); |
|||
log.info("chSqlSessionFactory"+bean.toString()); |
|||
return bean.getObject(); |
|||
} |
|||
|
|||
//配置事务
|
|||
@Bean(name="transactionManager") |
|||
public DataSourceTransactionManager testTransactionManager(@Qualifier("chDataSource") DataSource dataSource) { |
|||
return new DataSourceTransactionManager(dataSource); |
|||
} |
|||
|
|||
//
|
|||
@Bean(name="sqlSessionTemplate") |
|||
public SqlSessionTemplate testSqlSessionTemplate(@Qualifier("chSqlSessionFactory") SqlSessionFactory sqlSessionFactory) { |
|||
return new SqlSessionTemplate(sqlSessionFactory); |
|||
} |
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
package com.xtong.zhbs.configure; |
|||
|
|||
import org.apache.commons.logging.Log; |
|||
import org.apache.commons.logging.LogFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.core.env.Environment; |
|||
|
|||
@Configuration |
|||
public class EnvConfig { |
|||
private Log log = LogFactory.getLog(EnvConfig.class); |
|||
|
|||
@Autowired |
|||
private Environment env; |
|||
|
|||
/** |
|||
* 获取大数据链接信息 |
|||
* 项目初始化的时候完成操作 |
|||
* @return |
|||
*/ |
|||
@Bean |
|||
public static String yxDbConf(){ |
|||
//读取当前运行位置
|
|||
String curPath=System.getProperty("user.dir"); |
|||
return curPath; |
|||
} |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
package com.xtong.zhbs.configure; |
|||
|
|||
import com.xtong.zhbs.xss.XssFilter; |
|||
import org.springframework.boot.web.servlet.FilterRegistrationBean; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
|
|||
import javax.servlet.DispatcherType; |
|||
|
|||
/** |
|||
* Filter配置 |
|||
* |
|||
*/ |
|||
@Configuration |
|||
public class FilterConfig { |
|||
@Bean |
|||
public FilterRegistrationBean xssFilterRegistration() { |
|||
FilterRegistrationBean registration = new FilterRegistrationBean(); |
|||
registration.setDispatcherTypes(DispatcherType.REQUEST); |
|||
registration.setFilter(new XssFilter()); |
|||
registration.addUrlPatterns("/*"); |
|||
registration.setName("xssFilter"); |
|||
registration.setOrder(Integer.MAX_VALUE); |
|||
return registration; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
package com.xtong.zhbs.constant; |
|||
|
|||
|
|||
import com.xtong.zhbs.configure.EnvConfig; |
|||
|
|||
/** |
|||
* 系统常量 |
|||
*/ |
|||
public class ChConstant { |
|||
//项目运行目录
|
|||
public static final String WORK_DIR = EnvConfig.yxDbConf(); |
|||
|
|||
//数据库链接文件路径
|
|||
public static final String DB_CONF = "/conf/db.properties"; |
|||
|
|||
// 其他配置
|
|||
public static final String SZWH_CONF="/conf/zhbs.properties"; |
|||
|
|||
//分页大小
|
|||
public static final int PAGESIZE=12; |
|||
/** |
|||
* 系统密文 |
|||
* 43位字符长度 |
|||
*/ |
|||
public static final String SYS_SECRECT="mQ4jvhc5UAY1HDu87jfR5rkDkVRvKF1ZeaUpuVpBnNG"; |
|||
|
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
package com.xtong.zhbs.exception; |
|||
|
|||
/** |
|||
* 全局异常 |
|||
*/ |
|||
public class ChException extends RuntimeException { |
|||
private String msg; |
|||
private int code; |
|||
|
|||
public String getMsg() { |
|||
return msg; |
|||
} |
|||
|
|||
public void setMsg(String msg) { |
|||
this.msg = msg; |
|||
} |
|||
|
|||
public int getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(int code) { |
|||
this.code = code; |
|||
} |
|||
|
|||
public ChException(String msg, int code) { |
|||
this.msg = msg; |
|||
this.code = code; |
|||
} |
|||
|
|||
public ChException(String msg) { |
|||
this.msg = msg; |
|||
} |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
package com.xtong.zhbs.mapper; |
|||
|
|||
import com.xtong.zhbs.bean.PassengerFlow; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Component |
|||
public interface PassengerFlowMapper { |
|||
/** |
|||
* add |
|||
* @param passengerFlow |
|||
* @return |
|||
*/ |
|||
int addPasflow(PassengerFlow passengerFlow); |
|||
|
|||
/** |
|||
* get passenger flow |
|||
* @return |
|||
*/ |
|||
List<PassengerFlow> getPassFlowList(@Param("startRs") int startrs,@Param("pageSize") int pagesize); |
|||
} |
|||
@ -0,0 +1,530 @@ |
|||
package com.xtong.zhbs.xss; |
|||
|
|||
import java.util.*; |
|||
import java.util.concurrent.ConcurrentHashMap; |
|||
import java.util.concurrent.ConcurrentMap; |
|||
import java.util.logging.Logger; |
|||
import java.util.regex.Matcher; |
|||
import java.util.regex.Pattern; |
|||
|
|||
/** |
|||
* |
|||
* HTML filtering utility for protecting against XSS (Cross Site Scripting). |
|||
* |
|||
* This code is licensed LGPLv3 |
|||
* |
|||
* This code is a Java port of the original work in PHP by Cal Hendersen. |
|||
* http://code.iamcal.com/php/lib_filter/
|
|||
* |
|||
* The trickiest part of the translation was handling the differences in regex handling |
|||
* between PHP and Java. These resources were helpful in the process: |
|||
* |
|||
* http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
|
|||
* http://us2.php.net/manual/en/reference.pcre.pattern.modifiers.php
|
|||
* http://www.regular-expressions.info/modifiers.html
|
|||
* |
|||
* A note on naming conventions: instance variables are prefixed with a "v"; global |
|||
* constants are in all caps. |
|||
* |
|||
* Sample use: |
|||
* String input = ... |
|||
* String clean = new HTMLFilter().filter( input ); |
|||
* |
|||
* The class is not thread safe. Create a new instance if in doubt. |
|||
* |
|||
* If you find bugs or have suggestions on improvement (especially regarding |
|||
* performance), please contact us. The latest version of this |
|||
* source, and our contact details, can be found at http://xss-html-filter.sf.net
|
|||
* |
|||
* @author Joseph O'Connell |
|||
* @author Cal Hendersen |
|||
* @author Michael Semb Wever |
|||
*/ |
|||
public final class HTMLFilter { |
|||
|
|||
/** regex flag union representing /si modifiers in php **/ |
|||
private static final int REGEX_FLAGS_SI = Pattern.CASE_INSENSITIVE | Pattern.DOTALL; |
|||
private static final Pattern P_COMMENTS = Pattern.compile("<!--(.*?)-->", Pattern.DOTALL); |
|||
private static final Pattern P_COMMENT = Pattern.compile("^!--(.*)--$", REGEX_FLAGS_SI); |
|||
private static final Pattern P_TAGS = Pattern.compile("<(.*?)>", Pattern.DOTALL); |
|||
private static final Pattern P_END_TAG = Pattern.compile("^/([a-z0-9]+)", REGEX_FLAGS_SI); |
|||
private static final Pattern P_START_TAG = Pattern.compile("^([a-z0-9]+)(.*?)(/?)$", REGEX_FLAGS_SI); |
|||
private static final Pattern P_QUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)=([\"'])(.*?)\\2", REGEX_FLAGS_SI); |
|||
private static final Pattern P_UNQUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)(=)([^\"\\s']+)", REGEX_FLAGS_SI); |
|||
private static final Pattern P_PROTOCOL = Pattern.compile("^([^:]+):", REGEX_FLAGS_SI); |
|||
private static final Pattern P_ENTITY = Pattern.compile("&#(\\d+);?"); |
|||
private static final Pattern P_ENTITY_UNICODE = Pattern.compile("&#x([0-9a-f]+);?"); |
|||
private static final Pattern P_ENCODE = Pattern.compile("%([0-9a-f]{2});?"); |
|||
private static final Pattern P_VALID_ENTITIES = Pattern.compile("&([^&;]*)(?=(;|&|$))"); |
|||
private static final Pattern P_VALID_QUOTES = Pattern.compile("(>|^)([^<]+?)(<|$)", Pattern.DOTALL); |
|||
private static final Pattern P_END_ARROW = Pattern.compile("^>"); |
|||
private static final Pattern P_BODY_TO_END = Pattern.compile("<([^>]*?)(?=<|$)"); |
|||
private static final Pattern P_XML_CONTENT = Pattern.compile("(^|>)([^<]*?)(?=>)"); |
|||
private static final Pattern P_STRAY_LEFT_ARROW = Pattern.compile("<([^>]*?)(?=<|$)"); |
|||
private static final Pattern P_STRAY_RIGHT_ARROW = Pattern.compile("(^|>)([^<]*?)(?=>)"); |
|||
private static final Pattern P_AMP = Pattern.compile("&"); |
|||
private static final Pattern P_QUOTE = Pattern.compile("<"); |
|||
private static final Pattern P_LEFT_ARROW = Pattern.compile("<"); |
|||
private static final Pattern P_RIGHT_ARROW = Pattern.compile(">"); |
|||
private static final Pattern P_BOTH_ARROWS = Pattern.compile("<>"); |
|||
|
|||
// @xxx could grow large... maybe use sesat's ReferenceMap
|
|||
private static final ConcurrentMap<String,Pattern> P_REMOVE_PAIR_BLANKS = new ConcurrentHashMap<String, Pattern>(); |
|||
private static final ConcurrentMap<String,Pattern> P_REMOVE_SELF_BLANKS = new ConcurrentHashMap<String, Pattern>(); |
|||
|
|||
/** set of allowed html elements, along with allowed attributes for each element **/ |
|||
private final Map<String, List<String>> vAllowed; |
|||
/** counts of open tags for each (allowable) html element **/ |
|||
private final Map<String, Integer> vTagCounts = new HashMap<String, Integer>(); |
|||
|
|||
/** html elements which must always be self-closing (e.g. "<img />") **/ |
|||
private final String[] vSelfClosingTags; |
|||
/** html elements which must always have separate opening and closing tags (e.g. "<b></b>") **/ |
|||
private final String[] vNeedClosingTags; |
|||
/** set of disallowed html elements **/ |
|||
private final String[] vDisallowed; |
|||
/** attributes which should be checked for valid protocols **/ |
|||
private final String[] vProtocolAtts; |
|||
/** allowed protocols **/ |
|||
private final String[] vAllowedProtocols; |
|||
/** tags which should be removed if they contain no content (e.g. "<b></b>" or "<b />") **/ |
|||
private final String[] vRemoveBlanks; |
|||
/** entities allowed within html markup **/ |
|||
private final String[] vAllowedEntities; |
|||
/** flag determining whether comments are allowed in input String. */ |
|||
private final boolean stripComment; |
|||
private final boolean encodeQuotes; |
|||
private boolean vDebug = false; |
|||
/** |
|||
* flag determining whether to try to make tags when presented with "unbalanced" |
|||
* angle brackets (e.g. "<b text </b>" becomes "<b> text </b>"). If set to false, |
|||
* unbalanced angle brackets will be html escaped. |
|||
*/ |
|||
private final boolean alwaysMakeTags; |
|||
|
|||
/** Default constructor. |
|||
* |
|||
*/ |
|||
public HTMLFilter() { |
|||
vAllowed = new HashMap<>(); |
|||
|
|||
final ArrayList<String> a_atts = new ArrayList<String>(); |
|||
a_atts.add("href"); |
|||
a_atts.add("target"); |
|||
vAllowed.put("a", a_atts); |
|||
|
|||
final ArrayList<String> img_atts = new ArrayList<String>(); |
|||
img_atts.add("src"); |
|||
img_atts.add("width"); |
|||
img_atts.add("height"); |
|||
img_atts.add("alt"); |
|||
vAllowed.put("img", img_atts); |
|||
|
|||
final ArrayList<String> no_atts = new ArrayList<String>(); |
|||
vAllowed.put("b", no_atts); |
|||
vAllowed.put("strong", no_atts); |
|||
vAllowed.put("i", no_atts); |
|||
vAllowed.put("em", no_atts); |
|||
|
|||
vSelfClosingTags = new String[]{"img"}; |
|||
vNeedClosingTags = new String[]{"a", "b", "strong", "i", "em"}; |
|||
vDisallowed = new String[]{}; |
|||
vAllowedProtocols = new String[]{"http", "mailto", "https"}; // no ftp.
|
|||
vProtocolAtts = new String[]{"src", "href"}; |
|||
vRemoveBlanks = new String[]{"a", "b", "strong", "i", "em"}; |
|||
vAllowedEntities = new String[]{"amp", "gt", "lt", "quot"}; |
|||
stripComment = true; |
|||
encodeQuotes = true; |
|||
alwaysMakeTags = true; |
|||
} |
|||
|
|||
/** Set debug flag to true. Otherwise use default settings. See the default constructor. |
|||
* |
|||
* @param debug turn debug on with a true argument |
|||
*/ |
|||
public HTMLFilter(final boolean debug) { |
|||
this(); |
|||
vDebug = debug; |
|||
|
|||
} |
|||
|
|||
/** Map-parameter configurable constructor. |
|||
* |
|||
* @param conf map containing configuration. keys match field names. |
|||
*/ |
|||
public HTMLFilter(final Map<String,Object> conf) { |
|||
|
|||
assert conf.containsKey("vAllowed") : "configuration requires vAllowed"; |
|||
assert conf.containsKey("vSelfClosingTags") : "configuration requires vSelfClosingTags"; |
|||
assert conf.containsKey("vNeedClosingTags") : "configuration requires vNeedClosingTags"; |
|||
assert conf.containsKey("vDisallowed") : "configuration requires vDisallowed"; |
|||
assert conf.containsKey("vAllowedProtocols") : "configuration requires vAllowedProtocols"; |
|||
assert conf.containsKey("vProtocolAtts") : "configuration requires vProtocolAtts"; |
|||
assert conf.containsKey("vRemoveBlanks") : "configuration requires vRemoveBlanks"; |
|||
assert conf.containsKey("vAllowedEntities") : "configuration requires vAllowedEntities"; |
|||
|
|||
vAllowed = Collections.unmodifiableMap((HashMap<String, List<String>>) conf.get("vAllowed")); |
|||
vSelfClosingTags = (String[]) conf.get("vSelfClosingTags"); |
|||
vNeedClosingTags = (String[]) conf.get("vNeedClosingTags"); |
|||
vDisallowed = (String[]) conf.get("vDisallowed"); |
|||
vAllowedProtocols = (String[]) conf.get("vAllowedProtocols"); |
|||
vProtocolAtts = (String[]) conf.get("vProtocolAtts"); |
|||
vRemoveBlanks = (String[]) conf.get("vRemoveBlanks"); |
|||
vAllowedEntities = (String[]) conf.get("vAllowedEntities"); |
|||
stripComment = conf.containsKey("stripComment") ? (Boolean) conf.get("stripComment") : true; |
|||
encodeQuotes = conf.containsKey("encodeQuotes") ? (Boolean) conf.get("encodeQuotes") : true; |
|||
alwaysMakeTags = conf.containsKey("alwaysMakeTags") ? (Boolean) conf.get("alwaysMakeTags") : true; |
|||
} |
|||
|
|||
private void reset() { |
|||
vTagCounts.clear(); |
|||
} |
|||
|
|||
private void debug(final String msg) { |
|||
if (vDebug) { |
|||
Logger.getAnonymousLogger().info(msg); |
|||
} |
|||
} |
|||
|
|||
//---------------------------------------------------------------
|
|||
// my versions of some PHP library functions
|
|||
public static String chr(final int decimal) { |
|||
return String.valueOf((char) decimal); |
|||
} |
|||
|
|||
public static String htmlSpecialChars(final String s) { |
|||
String result = s; |
|||
result = regexReplace(P_AMP, "&", result); |
|||
result = regexReplace(P_QUOTE, """, result); |
|||
result = regexReplace(P_LEFT_ARROW, "<", result); |
|||
result = regexReplace(P_RIGHT_ARROW, ">", result); |
|||
return result; |
|||
} |
|||
|
|||
//---------------------------------------------------------------
|
|||
/** |
|||
* given a user submitted input String, filter out any invalid or restricted |
|||
* html. |
|||
* |
|||
* @param input text (i.e. submitted by a user) than may contain html |
|||
* @return "clean" version of input, with only valid, whitelisted html elements allowed |
|||
*/ |
|||
public String filter(final String input) { |
|||
reset(); |
|||
String s = input; |
|||
|
|||
debug("************************************************"); |
|||
debug(" INPUT: " + input); |
|||
|
|||
s = escapeComments(s); |
|||
debug(" escapeComments: " + s); |
|||
|
|||
s = balanceHTML(s); |
|||
debug(" balanceHTML: " + s); |
|||
|
|||
s = checkTags(s); |
|||
debug(" checkTags: " + s); |
|||
|
|||
s = processRemoveBlanks(s); |
|||
debug("processRemoveBlanks: " + s); |
|||
|
|||
s = validateEntities(s); |
|||
debug(" validateEntites: " + s); |
|||
|
|||
debug("************************************************\n\n"); |
|||
return s; |
|||
} |
|||
|
|||
public boolean isAlwaysMakeTags(){ |
|||
return alwaysMakeTags; |
|||
} |
|||
|
|||
public boolean isStripComments(){ |
|||
return stripComment; |
|||
} |
|||
|
|||
private String escapeComments(final String s) { |
|||
final Matcher m = P_COMMENTS.matcher(s); |
|||
final StringBuffer buf = new StringBuffer(); |
|||
if (m.find()) { |
|||
final String match = m.group(1); //(.*?)
|
|||
m.appendReplacement(buf, Matcher.quoteReplacement("<!--" + htmlSpecialChars(match) + "-->")); |
|||
} |
|||
m.appendTail(buf); |
|||
|
|||
return buf.toString(); |
|||
} |
|||
|
|||
private String balanceHTML(String s) { |
|||
if (alwaysMakeTags) { |
|||
//
|
|||
// try and form html
|
|||
//
|
|||
s = regexReplace(P_END_ARROW, "", s); |
|||
s = regexReplace(P_BODY_TO_END, "<$1>", s); |
|||
s = regexReplace(P_XML_CONTENT, "$1<$2", s); |
|||
|
|||
} else { |
|||
//
|
|||
// escape stray brackets
|
|||
//
|
|||
s = regexReplace(P_STRAY_LEFT_ARROW, "<$1", s); |
|||
s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2><", s); |
|||
|
|||
//
|
|||
// the last regexp causes '<>' entities to appear
|
|||
// (we need to do a lookahead assertion so that the last bracket can
|
|||
// be used in the next pass of the regexp)
|
|||
//
|
|||
s = regexReplace(P_BOTH_ARROWS, "", s); |
|||
} |
|||
|
|||
return s; |
|||
} |
|||
|
|||
private String checkTags(String s) { |
|||
Matcher m = P_TAGS.matcher(s); |
|||
|
|||
final StringBuffer buf = new StringBuffer(); |
|||
while (m.find()) { |
|||
String replaceStr = m.group(1); |
|||
replaceStr = processTag(replaceStr); |
|||
m.appendReplacement(buf, Matcher.quoteReplacement(replaceStr)); |
|||
} |
|||
m.appendTail(buf); |
|||
|
|||
s = buf.toString(); |
|||
|
|||
// these get tallied in processTag
|
|||
// (remember to reset before subsequent calls to filter method)
|
|||
for (String key : vTagCounts.keySet()) { |
|||
for (int ii = 0; ii < vTagCounts.get(key); ii++) { |
|||
s += "</" + key + ">"; |
|||
} |
|||
} |
|||
|
|||
return s; |
|||
} |
|||
|
|||
private String processRemoveBlanks(final String s) { |
|||
String result = s; |
|||
for (String tag : vRemoveBlanks) { |
|||
if(!P_REMOVE_PAIR_BLANKS.containsKey(tag)){ |
|||
P_REMOVE_PAIR_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?></" + tag + ">")); |
|||
} |
|||
result = regexReplace(P_REMOVE_PAIR_BLANKS.get(tag), "", result); |
|||
if(!P_REMOVE_SELF_BLANKS.containsKey(tag)){ |
|||
P_REMOVE_SELF_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?/>")); |
|||
} |
|||
result = regexReplace(P_REMOVE_SELF_BLANKS.get(tag), "", result); |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
|
|||
private static String regexReplace(final Pattern regex_pattern, final String replacement, final String s) { |
|||
Matcher m = regex_pattern.matcher(s); |
|||
return m.replaceAll(replacement); |
|||
} |
|||
|
|||
private String processTag(final String s) { |
|||
// ending tags
|
|||
Matcher m = P_END_TAG.matcher(s); |
|||
if (m.find()) { |
|||
final String name = m.group(1).toLowerCase(); |
|||
if (allowed(name)) { |
|||
if (!inArray(name, vSelfClosingTags)) { |
|||
if (vTagCounts.containsKey(name)) { |
|||
vTagCounts.put(name, vTagCounts.get(name) - 1); |
|||
return "</" + name + ">"; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
// starting tags
|
|||
m = P_START_TAG.matcher(s); |
|||
if (m.find()) { |
|||
final String name = m.group(1).toLowerCase(); |
|||
final String body = m.group(2); |
|||
String ending = m.group(3); |
|||
|
|||
//debug( "in a starting tag, name='" + name + "'; body='" + body + "'; ending='" + ending + "'" );
|
|||
if (allowed(name)) { |
|||
String params = ""; |
|||
|
|||
final Matcher m2 = P_QUOTED_ATTRIBUTES.matcher(body); |
|||
final Matcher m3 = P_UNQUOTED_ATTRIBUTES.matcher(body); |
|||
final List<String> paramNames = new ArrayList<String>(); |
|||
final List<String> paramValues = new ArrayList<String>(); |
|||
while (m2.find()) { |
|||
paramNames.add(m2.group(1)); //([a-z0-9]+)
|
|||
paramValues.add(m2.group(3)); //(.*?)
|
|||
} |
|||
while (m3.find()) { |
|||
paramNames.add(m3.group(1)); //([a-z0-9]+)
|
|||
paramValues.add(m3.group(3)); //([^\"\\s']+)
|
|||
} |
|||
|
|||
String paramName, paramValue; |
|||
for (int ii = 0; ii < paramNames.size(); ii++) { |
|||
paramName = paramNames.get(ii).toLowerCase(); |
|||
paramValue = paramValues.get(ii); |
|||
|
|||
// debug( "paramName='" + paramName + "'" );
|
|||
// debug( "paramValue='" + paramValue + "'" );
|
|||
// debug( "allowed? " + vAllowed.get( name ).contains( paramName ) );
|
|||
|
|||
if (allowedAttribute(name, paramName)) { |
|||
if (inArray(paramName, vProtocolAtts)) { |
|||
paramValue = processParamProtocol(paramValue); |
|||
} |
|||
params += " " + paramName + "=\"" + paramValue + "\""; |
|||
} |
|||
} |
|||
|
|||
if (inArray(name, vSelfClosingTags)) { |
|||
ending = " /"; |
|||
} |
|||
|
|||
if (inArray(name, vNeedClosingTags)) { |
|||
ending = ""; |
|||
} |
|||
|
|||
if (ending == null || ending.length() < 1) { |
|||
if (vTagCounts.containsKey(name)) { |
|||
vTagCounts.put(name, vTagCounts.get(name) + 1); |
|||
} else { |
|||
vTagCounts.put(name, 1); |
|||
} |
|||
} else { |
|||
ending = " /"; |
|||
} |
|||
return "<" + name + params + ending + ">"; |
|||
} else { |
|||
return ""; |
|||
} |
|||
} |
|||
|
|||
// comments
|
|||
m = P_COMMENT.matcher(s); |
|||
if (!stripComment && m.find()) { |
|||
return "<" + m.group() + ">"; |
|||
} |
|||
|
|||
return ""; |
|||
} |
|||
|
|||
private String processParamProtocol(String s) { |
|||
s = decodeEntities(s); |
|||
final Matcher m = P_PROTOCOL.matcher(s); |
|||
if (m.find()) { |
|||
final String protocol = m.group(1); |
|||
if (!inArray(protocol, vAllowedProtocols)) { |
|||
// bad protocol, turn into local anchor link instead
|
|||
s = "#" + s.substring(protocol.length() + 1, s.length()); |
|||
if (s.startsWith("#//")) { |
|||
s = "#" + s.substring(3, s.length()); |
|||
} |
|||
} |
|||
} |
|||
|
|||
return s; |
|||
} |
|||
|
|||
private String decodeEntities(String s) { |
|||
StringBuffer buf = new StringBuffer(); |
|||
|
|||
Matcher m = P_ENTITY.matcher(s); |
|||
while (m.find()) { |
|||
final String match = m.group(1); |
|||
final int decimal = Integer.decode(match).intValue(); |
|||
m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); |
|||
} |
|||
m.appendTail(buf); |
|||
s = buf.toString(); |
|||
|
|||
buf = new StringBuffer(); |
|||
m = P_ENTITY_UNICODE.matcher(s); |
|||
while (m.find()) { |
|||
final String match = m.group(1); |
|||
final int decimal = Integer.valueOf(match, 16).intValue(); |
|||
m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); |
|||
} |
|||
m.appendTail(buf); |
|||
s = buf.toString(); |
|||
|
|||
buf = new StringBuffer(); |
|||
m = P_ENCODE.matcher(s); |
|||
while (m.find()) { |
|||
final String match = m.group(1); |
|||
final int decimal = Integer.valueOf(match, 16).intValue(); |
|||
m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); |
|||
} |
|||
m.appendTail(buf); |
|||
s = buf.toString(); |
|||
|
|||
s = validateEntities(s); |
|||
return s; |
|||
} |
|||
|
|||
private String validateEntities(final String s) { |
|||
StringBuffer buf = new StringBuffer(); |
|||
|
|||
// validate entities throughout the string
|
|||
Matcher m = P_VALID_ENTITIES.matcher(s); |
|||
while (m.find()) { |
|||
final String one = m.group(1); //([^&;]*)
|
|||
final String two = m.group(2); //(?=(;|&|$))
|
|||
m.appendReplacement(buf, Matcher.quoteReplacement(checkEntity(one, two))); |
|||
} |
|||
m.appendTail(buf); |
|||
|
|||
return encodeQuotes(buf.toString()); |
|||
} |
|||
|
|||
private String encodeQuotes(final String s){ |
|||
if(encodeQuotes){ |
|||
StringBuffer buf = new StringBuffer(); |
|||
Matcher m = P_VALID_QUOTES.matcher(s); |
|||
while (m.find()) { |
|||
final String one = m.group(1); //(>|^)
|
|||
final String two = m.group(2); //([^<]+?)
|
|||
final String three = m.group(3); //(<|$)
|
|||
m.appendReplacement(buf, Matcher.quoteReplacement(one + regexReplace(P_QUOTE, """, two) + three)); |
|||
} |
|||
m.appendTail(buf); |
|||
return buf.toString(); |
|||
}else{ |
|||
return s; |
|||
} |
|||
} |
|||
|
|||
private String checkEntity(final String preamble, final String term) { |
|||
|
|||
return ";".equals(term) && isValidEntity(preamble) |
|||
? '&' + preamble |
|||
: "&" + preamble; |
|||
} |
|||
|
|||
private boolean isValidEntity(final String entity) { |
|||
return inArray(entity, vAllowedEntities); |
|||
} |
|||
|
|||
private static boolean inArray(final String s, final String[] array) { |
|||
for (String item : array) { |
|||
if (item != null && item.equals(s)) { |
|||
return true; |
|||
} |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
private boolean allowed(final String name) { |
|||
return (vAllowed.isEmpty() || vAllowed.containsKey(name)) && !inArray(name, vDisallowed); |
|||
} |
|||
|
|||
private boolean allowedAttribute(final String name, final String paramName) { |
|||
return allowed(name) && (vAllowed.isEmpty() || vAllowed.get(name).contains(paramName)); |
|||
} |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
package com.xtong.zhbs.xss; |
|||
|
|||
import com.xtong.zhbs.exception.ChException; |
|||
import org.apache.commons.lang.StringUtils; |
|||
|
|||
/** |
|||
* SQL过滤 |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
*/ |
|||
public class SQLFilter { |
|||
|
|||
/** |
|||
* SQL注入过滤 |
|||
* @param str 待验证的字符串 |
|||
*/ |
|||
public static String sqlInject(String str){ |
|||
if(StringUtils.isBlank(str)){ |
|||
return null; |
|||
} |
|||
//去掉'|"|;|\字符
|
|||
str = StringUtils.replace(str, "'", ""); |
|||
str = StringUtils.replace(str, "\"", ""); |
|||
str = StringUtils.replace(str, ";", ""); |
|||
str = StringUtils.replace(str, "\\", ""); |
|||
|
|||
//转换成小写
|
|||
str = str.toLowerCase(); |
|||
|
|||
//非法字符
|
|||
String[] keywords = {"master", "truncate", "insert", "select", "delete", "update", "declare", "alter", "drop"}; |
|||
|
|||
//判断是否包含非法字符
|
|||
for(String keyword : keywords){ |
|||
if(str.indexOf(keyword) != -1){ |
|||
throw new ChException("包含非法字符"); |
|||
} |
|||
} |
|||
|
|||
return str; |
|||
} |
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
package com.xtong.zhbs.xss; |
|||
|
|||
import javax.servlet.*; |
|||
import javax.servlet.http.HttpServletRequest; |
|||
import java.io.IOException; |
|||
|
|||
/** |
|||
* XSS过滤 |
|||
*/ |
|||
public class XssFilter implements Filter { |
|||
|
|||
@Override |
|||
public void init(FilterConfig config) throws ServletException { |
|||
} |
|||
|
|||
/** |
|||
* 过滤请求中的有害字符串 |
|||
* @param request |
|||
* @param response |
|||
* @param chain |
|||
* @throws IOException |
|||
* @throws ServletException |
|||
*/ |
|||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) |
|||
throws IOException, ServletException { |
|||
XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper( |
|||
(HttpServletRequest) request); |
|||
chain.doFilter(xssRequest, response); |
|||
} |
|||
|
|||
@Override |
|||
public void destroy() { |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,147 @@ |
|||
/** |
|||
* Copyright (c) 2016-2019 人人开源 All rights reserved. |
|||
* |
|||
* https://www.renren.io
|
|||
* |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.xtong.zhbs.xss; |
|||
|
|||
import org.apache.commons.io.IOUtils; |
|||
import org.apache.commons.lang.StringUtils; |
|||
import org.springframework.http.HttpHeaders; |
|||
import org.springframework.http.MediaType; |
|||
|
|||
import javax.servlet.ReadListener; |
|||
import javax.servlet.ServletInputStream; |
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletRequestWrapper; |
|||
import java.io.ByteArrayInputStream; |
|||
import java.io.IOException; |
|||
import java.util.LinkedHashMap; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* XSS过滤处理 |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
*/ |
|||
public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper { |
|||
//没被包装过的HttpServletRequest(特殊场景,需要自己过滤)
|
|||
HttpServletRequest orgRequest; |
|||
//html过滤
|
|||
private final static HTMLFilter htmlFilter = new HTMLFilter(); |
|||
|
|||
public XssHttpServletRequestWrapper(HttpServletRequest request) { |
|||
super(request); |
|||
orgRequest = request; |
|||
} |
|||
|
|||
@Override |
|||
public ServletInputStream getInputStream() throws IOException { |
|||
//非json类型,直接返回
|
|||
if(!MediaType.APPLICATION_JSON_VALUE.equalsIgnoreCase(super.getHeader(HttpHeaders.CONTENT_TYPE))){ |
|||
return super.getInputStream(); |
|||
} |
|||
|
|||
//为空,直接返回
|
|||
String json = IOUtils.toString(super.getInputStream(), "utf-8"); |
|||
if (StringUtils.isBlank(json)) { |
|||
return super.getInputStream(); |
|||
} |
|||
|
|||
//xss过滤
|
|||
json = xssEncode(json); |
|||
final ByteArrayInputStream bis = new ByteArrayInputStream(json.getBytes("utf-8")); |
|||
return new ServletInputStream() { |
|||
@Override |
|||
public boolean isFinished() { |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public boolean isReady() { |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public void setReadListener(ReadListener readListener) { |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public int read() throws IOException { |
|||
return bis.read(); |
|||
} |
|||
}; |
|||
} |
|||
|
|||
@Override |
|||
public String getParameter(String name) { |
|||
String value = super.getParameter(xssEncode(name)); |
|||
if (StringUtils.isNotBlank(value)) { |
|||
value = xssEncode(value); |
|||
} |
|||
return value; |
|||
} |
|||
|
|||
@Override |
|||
public String[] getParameterValues(String name) { |
|||
String[] parameters = super.getParameterValues(name); |
|||
if (parameters == null || parameters.length == 0) { |
|||
return null; |
|||
} |
|||
|
|||
for (int i = 0; i < parameters.length; i++) { |
|||
parameters[i] = xssEncode(parameters[i]); |
|||
} |
|||
return parameters; |
|||
} |
|||
|
|||
@Override |
|||
public Map<String,String[]> getParameterMap() { |
|||
Map<String,String[]> map = new LinkedHashMap<>(); |
|||
Map<String,String[]> parameters = super.getParameterMap(); |
|||
for (String key : parameters.keySet()) { |
|||
String[] values = parameters.get(key); |
|||
for (int i = 0; i < values.length; i++) { |
|||
values[i] = xssEncode(values[i]); |
|||
} |
|||
map.put(key, values); |
|||
} |
|||
return map; |
|||
} |
|||
|
|||
@Override |
|||
public String getHeader(String name) { |
|||
String value = super.getHeader(xssEncode(name)); |
|||
if (StringUtils.isNotBlank(value)) { |
|||
value = xssEncode(value); |
|||
} |
|||
return value; |
|||
} |
|||
|
|||
private String xssEncode(String input) { |
|||
return htmlFilter.filter(input); |
|||
} |
|||
|
|||
/** |
|||
* 获取最原始的request |
|||
*/ |
|||
public HttpServletRequest getOrgRequest() { |
|||
return orgRequest; |
|||
} |
|||
|
|||
/** |
|||
* 获取最原始的request |
|||
*/ |
|||
public static HttpServletRequest getOrgRequest(HttpServletRequest request) { |
|||
if (request instanceof XssHttpServletRequestWrapper) { |
|||
return ((XssHttpServletRequestWrapper) request).getOrgRequest(); |
|||
} |
|||
|
|||
return request; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
server.port=9099 |
|||
|
|||
logging.config=classpath:logback-spring.xml |
|||
logging.path=./logs/ |
|||
|
|||
mybatis.mapper-locations=classpath*:/mapper/szwh/*.xml |
|||
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl |
|||
# 开启调试sql语句 |
|||
logging.level.cn.chjyj.szwh.mapper=DEBUG |
|||
|
|||
#dameng db information |
|||
spring.datasou |
|||
@ -0,0 +1,4 @@ |
|||
${AnsiColor.GREEN} |
|||
============ zhbs ============ |
|||
=========== springboot版本:${spring-boot.formatted-version} =========== |
|||
================= copyright reseved =========== |
|||
@ -0,0 +1,5 @@ |
|||
log4j.rootLogger=DEBUG,A1 |
|||
log4j.logger.org.apache=DEBUG |
|||
log4j.appender.A1=org.apache.log4j.ConsoleAppender |
|||
log4j.appender.A1.layout=org.apache.log4j.PatternLayout |
|||
log4j.appender.A1.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss,SSS} [%t] [%c]-[%p] %m%n |
|||
@ -0,0 +1,188 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 --> |
|||
<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true --> |
|||
<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 --> |
|||
<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 --> |
|||
<configuration scan="true" scanPeriod="10 seconds"> |
|||
|
|||
<!--<include resource="org/springframework/boot/logging/logback/base.xml" />--> |
|||
|
|||
<contextName>logback</contextName> |
|||
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 --> |
|||
<!--<property name="logging.path" value="${logging.path}" />--> |
|||
<!--<springProfile name="logging.path" scope="context" source="project.log.path" defaultValue="./aislogs/"/>--> |
|||
<springProperty name="LOG_PATH" source="logging.path" defaultValue="/home/zhbs/logs" /> |
|||
|
|||
|
|||
<!-- 彩色日志 --> |
|||
<!-- 彩色日志依赖的渲染类 --> |
|||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> |
|||
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> |
|||
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> |
|||
<!-- 彩色日志格式 --> |
|||
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/> |
|||
|
|||
|
|||
<!--输出到控制台--> |
|||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
|||
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息--> |
|||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
|||
<level>info</level> |
|||
</filter> |
|||
<encoder> |
|||
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern> |
|||
<!-- 设置字符集 --> |
|||
<charset>UTF-8</charset> |
|||
</encoder> |
|||
</appender> |
|||
|
|||
|
|||
<!--输出到文件--> |
|||
|
|||
<!-- 时间滚动输出 level为 DEBUG 日志 --> |
|||
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文件的路径及文件名 --> |
|||
<file>${LOG_PATH}/log_debug.log</file> |
|||
<!--日志文件输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<!-- 日志归档 --> |
|||
<fileNamePattern>${LOG_PATH}/debug/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>20MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文件保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文件只记录debug级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>debug</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 时间滚动输出 level为 INFO 日志 --> |
|||
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文件的路径及文件名 --> |
|||
<file>${LOG_PATH}/log_info.log</file> |
|||
<!--日志文件输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<!-- 每天日志归档路径以及格式 --> |
|||
<fileNamePattern>${LOG_PATH}/info/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>20MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文件保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文件只记录info级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>info</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 时间滚动输出 level为 WARN 日志 --> |
|||
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文件的路径及文件名 --> |
|||
<file>${LOG_PATH}/log_warn.log</file> |
|||
<!--日志文件输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<fileNamePattern>${LOG_PATH}/warn/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>20MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文件保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文件只记录warn级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>warn</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
|
|||
<!-- 时间滚动输出 level为 ERROR 日志 --> |
|||
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文件的路径及文件名 --> |
|||
<file>${LOG_PATH}/log_error.log</file> |
|||
<!--日志文件输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<fileNamePattern>${LOG_PATH}/error/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>10MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文件保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文件只记录ERROR级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>ERROR</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- |
|||
<logger>用来设置某一个包或者具体的某一个类的日志打印级别、 |
|||
以及指定<appender>。<logger>仅有一个name属性, |
|||
一个可选的level和一个可选的addtivity属性。 |
|||
name:用来指定受此logger约束的某一个包或者具体的某一个类。 |
|||
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF, |
|||
还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。 |
|||
如果未设置此属性,那么当前logger将会继承上级的级别。 |
|||
addtivity:是否向上级logger传递打印信息。默认是true。 |
|||
--> |
|||
<!--<logger name="org.springframework.web" level="info"/>--> |
|||
<!--<logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/>--> |
|||
<!-- |
|||
使用mybatis的时候,sql语句是debug下才会打印,而这里我们只配置了info,所以想要查看sql语句的话,有以下两种操作: |
|||
第一种把<root level="info">改成<root level="DEBUG">这样就会打印sql,不过这样日志那边会出现很多其他消息 |
|||
第二种就是单独给dao下目录配置debug模式,代码如下,这样配置sql语句会打印,其他还是正常info级别: |
|||
--> |
|||
|
|||
|
|||
<!-- |
|||
root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性 |
|||
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF, |
|||
不能设置为INHERITED或者同义词NULL。默认是DEBUG |
|||
可以包含零个或多个元素,标识这个appender将会添加到这个logger。 |
|||
--> |
|||
|
|||
<!--开发环境:打印控制台--> |
|||
<springProfile name="dev"> |
|||
<logger name="com.nmys.view" level="debug"/> |
|||
</springProfile> |
|||
|
|||
<root level="info"> |
|||
<appender-ref ref="CONSOLE" /> |
|||
<appender-ref ref="DEBUG_FILE" /> |
|||
<appender-ref ref="INFO_FILE" /> |
|||
<appender-ref ref="WARN_FILE" /> |
|||
<appender-ref ref="ERROR_FILE" /> |
|||
</root> |
|||
|
|||
</configuration> |
|||
@ -0,0 +1,122 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.xtong.zhbs.mapper.PassengerFlowMapper"> |
|||
|
|||
<sql id="column"> |
|||
"id","groupId","groupName","flowInNum","flowOutNum" |
|||
</sql> |
|||
<sql id="tbName">"CXK"."bt_passenger_flow"</sql> |
|||
|
|||
<!--查询记录列表--> |
|||
<select id="getPassFlowList" parameterType="java.lang.Integer" resultType="com.xtong.zhbs.bean.PassengerFlow"> |
|||
SELECT <include refid="column"/> from <include refid="tbName"/> |
|||
WHERE "id">#{startRs} limit #{pageSize} |
|||
</select> |
|||
|
|||
<!--查询用户名,加上密码--> |
|||
<select id="getUserByIsli" parameterType="java.lang.String" resultType="com.xtong.zhbs.bean.PassengerFlow"> |
|||
select<include refid="column"/> |
|||
from |
|||
<include refid="tbName"/> |
|||
where user_isli=#{userIsli} limit 1; |
|||
</select> |
|||
|
|||
<!--查询用户--> |
|||
<select id="getSingleUserByOpenid" parameterType="java.lang.String" resultType="com.xtong.zhbs.bean.PassengerFlow"> |
|||
select |
|||
<include refid="column"/> |
|||
from |
|||
<include refid="tbName"/> |
|||
where openid=#{openid}; |
|||
</select> |
|||
|
|||
<!--新增用户--> |
|||
<insert id="addPasflow" parameterType="com.xtong.zhbs.bean.PassengerFlow" useGeneratedKeys="true" keyProperty="id" keyColumn='"id"'> |
|||
insert into |
|||
<include refid="tbName"/> |
|||
("groupId","groupName","flowInNum","flowOutNum") |
|||
values ( |
|||
#{groupId}, |
|||
#{groupName}, |
|||
#{flowInNum}, |
|||
#{flowOutNum} |
|||
) |
|||
</insert> |
|||
|
|||
<update id="updateUser" parameterType="com.xtong.zhbs.bean.PassengerFlow"> |
|||
update |
|||
<include refid="tbName"/> |
|||
<set> |
|||
<if test="userIsli!=null"> |
|||
user_isli=#{userIsli}, |
|||
</if> |
|||
<if test="username!=null"> |
|||
username=#{username}, |
|||
</if> |
|||
<if test="institutionCode!=null"> |
|||
institution_code =#{institutionCode}, |
|||
</if> |
|||
<if test="agencyType!=null"> |
|||
agency_type=#{agencyType} |
|||
</if> |
|||
<if test="certType!=null"> |
|||
cert_type=#{certType} |
|||
</if> |
|||
<if test="idNumber!=null"> |
|||
idNumber=#{idNumber} |
|||
</if> |
|||
<if test="cellPhone!=null"> |
|||
cell_phone=#{cellPhone} |
|||
</if> |
|||
<if test="bankAccount!=null"> |
|||
bank_account=#{bankAccount} |
|||
</if> |
|||
<if test="legalsName!=null"> |
|||
legals_name=#{legalsName} |
|||
</if> |
|||
<if test="legalsType!=null"> |
|||
legals_type=#{legalsType} |
|||
</if> |
|||
<if test="legalsIdnum!=null"> |
|||
legals_idnum=#{legalsIdnum} |
|||
</if> |
|||
<if test="legalsPhone!=null"> |
|||
legals_phone=#{legalsPhone} |
|||
</if> |
|||
<if test="bankCardType!=null"> |
|||
bank_card_type=#{bankCardType} |
|||
</if> |
|||
<if test="bankType!=null"> |
|||
bank_type=#{bankType} |
|||
</if> |
|||
<if test="bankName!=null"> |
|||
bank_name=#{bankName} |
|||
</if> |
|||
<if test="bankUsername!=null"> |
|||
bank_username=#{bankUsername} |
|||
</if> |
|||
<if test="bankUserid!=null"> |
|||
bank_userid=#{bankUserid} |
|||
</if> |
|||
<if test="bankUserphone!=null"> |
|||
bank_userphone=#{bankUserphone} |
|||
</if> |
|||
<if test="bankAddress!=null"> |
|||
bank_address=#{bankAddress} |
|||
</if> |
|||
<if test="attestStatus!=null"> |
|||
attest_status=#{attestStatus} |
|||
</if> |
|||
<if test="registertime!=null"> |
|||
registertime=#{registertime} |
|||
</if> |
|||
<if test="attesttime!=null"> |
|||
attesttime=#{} |
|||
</if> |
|||
</set> |
|||
where id=#{id}; |
|||
</update> |
|||
|
|||
</mapper> |
|||
@ -0,0 +1,14 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE configuration |
|||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-config.dtd"> |
|||
<configuration> |
|||
<settings> |
|||
<setting name="cacheEnabled" value="true" /> <!-- 全局映射器启用缓存 --> |
|||
<setting name="useGeneratedKeys" value="true" /> <!-- 允许 JDBC 支持自动生成主键 --> |
|||
<setting name="defaultExecutorType" value="REUSE" /> <!-- 配置默认的执行器 --> |
|||
<setting name="logImpl" value="Log4j" /> <!-- 指定 MyBatis 所用日志的具体实现 --> |
|||
<!-- <setting name="logImpl" value="STDOUT_LOGGING"/>--> |
|||
<setting name="mapUnderscoreToCamelCase" value="true"/> <!--驼峰式命名 --> |
|||
</settings> |
|||
</configuration> |
|||
@ -0,0 +1,13 @@ |
|||
package com.xtong.zhbs; |
|||
|
|||
import org.junit.jupiter.api.Test; |
|||
import org.springframework.boot.test.context.SpringBootTest; |
|||
|
|||
@SpringBootTest |
|||
class ZhbsApplicationTests { |
|||
|
|||
@Test |
|||
void contextLoads() { |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
package com.xtong.zhbs.mapper; |
|||
|
|||
import com.xtong.zhbs.bean.PassengerFlow; |
|||
import org.junit.Test; |
|||
import org.junit.runner.RunWith; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.boot.test.context.SpringBootTest; |
|||
import org.springframework.test.context.junit4.SpringRunner; |
|||
|
|||
import java.util.List; |
|||
|
|||
import static org.junit.Assert.*; |
|||
|
|||
@SpringBootTest |
|||
@RunWith(SpringRunner.class) |
|||
public class PassengerFlowMapperTest { |
|||
@Autowired |
|||
private PassengerFlowMapper passengerFlowMapper; |
|||
|
|||
@Test |
|||
public void addPasflow() { |
|||
PassengerFlow passengerFlow = new PassengerFlow(); |
|||
passengerFlow.setGroupId("ba001"); |
|||
passengerFlow.setGroupName("图书股"); |
|||
passengerFlow.setFlowOutNum(1204); |
|||
passengerFlow.setFlowOutNum(1145); |
|||
//
|
|||
int id = passengerFlowMapper.addPasflow(passengerFlow); |
|||
System.out.println(id); |
|||
} |
|||
|
|||
@Test |
|||
public void getPassFlowList() { |
|||
List<PassengerFlow> passengerFlowList = passengerFlowMapper.getPassFlowList(0,10); |
|||
int total = passengerFlowList.size(); |
|||
passengerFlowList.stream().forEach(item->{ |
|||
System.out.println(item.getGroupName()); |
|||
}); |
|||
System.out.println(total); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue