main
lwy 2 years ago
parent ae4358a5a6
commit 8a10622df7

File diff suppressed because it is too large Load Diff

@ -0,0 +1,253 @@
2023-05-06T09:12:08.596+08:00 INFO 20016 --- [restartedMain] t.l.r.ReadStatisticsApplication : Starting ReadStatisticsApplication using Java 17.0.7 with PID 20016 (D:\OneDrive\编程\java\new\read_statistics\target\classes started by lwy in D:\OneDrive\编程\java\new\read_statistics)
2023-05-06T09:12:08.600+08:00 INFO 20016 --- [restartedMain] t.l.r.ReadStatisticsApplication : No active profile set, falling back to 1 default profile: "default"
2023-05-06T09:12:08.702+08:00 INFO 20016 --- [restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2023-05-06T09:12:08.702+08:00 INFO 20016 --- [restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2023-05-06T09:12:10.642+08:00 INFO 20016 --- [restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2023-05-06T09:12:10.662+08:00 INFO 20016 --- [restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2023-05-06T09:12:10.663+08:00 INFO 20016 --- [restartedMain] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.8]
2023-05-06T09:12:10.777+08:00 INFO 20016 --- [restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2023-05-06T09:12:10.778+08:00 INFO 20016 --- [restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2074 ms
2023-05-06T09:12:11.641+08:00 INFO 20016 --- [restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2023-05-06T09:12:11.924+08:00 INFO 20016 --- [restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2023-05-06T09:12:11.941+08:00 INFO 20016 --- [restartedMain] t.l.r.ReadStatisticsApplication : Started ReadStatisticsApplication in 4.113 seconds (process running for 4.812)
2023-05-06T09:31:19.972+08:00 INFO 20016 --- [http-nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2023-05-06T09:31:19.972+08:00 INFO 20016 --- [http-nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2023-05-06T09:31:19.974+08:00 INFO 20016 --- [http-nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 2 ms
2023-05-06T09:31:20.120+08:00 ERROR 20016 --- [http-nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.sql.SQLException: No suitable driver found for ${spring.datasource.url}
### The error may exist in top/liangwy/read_statistics/dao/ScanMapper.xml
### The error may involve top.liangwy.read_statistics.dao.ScanMapper.getUserScanList
### The error occurred while executing a query
### Cause: java.sql.SQLException: No suitable driver found for ${spring.datasource.url}] with root cause
java.sql.SQLException: No suitable driver found for ${spring.datasource.url}
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:706) ~[java.sql:na]
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:190) ~[java.sql:na]
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:224) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:219) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:95) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:446) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:96) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:145) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:67) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:337) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:86) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:89) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:87) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) ~[mybatis-3.5.11.jar:3.5.11]
at jdk.proxy3/jdk.proxy3.$Proxy77.getUserScanList(Unknown Source) ~[na:na]
at top.liangwy.read_statistics.controller.ScanController.home(ScanController.java:45) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:207) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:152) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118) ~[spring-webmvc-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:884) ~[spring-webmvc-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) ~[spring-webmvc-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1081) ~[spring-webmvc-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:974) ~[spring-webmvc-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1011) ~[spring-webmvc-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903) ~[spring-webmvc-6.0.8.jar:6.0.8]
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564) ~[tomcat-embed-core-10.1.8.jar:6.0]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[spring-webmvc-6.0.8.jar:6.0.8]
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) ~[tomcat-embed-core-10.1.8.jar:6.0]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) ~[tomcat-embed-websocket-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.8.jar:6.0.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.8.jar:6.0.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.8.jar:6.0.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
2023-05-06T09:31:58.240+08:00 ERROR 26104 --- [restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under 'logging.level.root' to org.springframework.boot.logging.LogLevel:
Property: logging.level.root
Value: "D:\info"
Origin: class path resource [application.yml] - 9:11
Reason: failed to convert java.lang.String to org.springframework.boot.logging.LogLevel (caused by java.lang.IllegalArgumentException: No enum constant org.springframework.boot.logging.LogLevel.D:\info)
Action:
Update your application's configuration. The following values are valid:
DEBUG
ERROR
FATAL
INFO
OFF
TRACE
WARN
2023-05-06T09:33:46.982+08:00 ERROR 2920 --- [restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under 'logging.level.root' to org.springframework.boot.logging.LogLevel:
Property: logging.level.root
Value: "D:\info"
Origin: class path resource [application.yml] - 9:11
Reason: failed to convert java.lang.String to org.springframework.boot.logging.LogLevel (caused by java.lang.IllegalArgumentException: No enum constant org.springframework.boot.logging.LogLevel.D:\info)
Action:
Update your application's configuration. The following values are valid:
DEBUG
ERROR
FATAL
INFO
OFF
TRACE
WARN
2023-05-06T09:34:58.363+08:00 INFO 21000 --- [restartedMain] t.l.r.ReadStatisticsApplication : Starting ReadStatisticsApplication using Java 17.0.7 with PID 21000 (D:\OneDrive\编程\java\new\read_statistics\target\classes started by lwy in D:\OneDrive\编程\java\new\read_statistics)
2023-05-06T09:34:58.367+08:00 DEBUG 21000 --- [restartedMain] t.l.r.ReadStatisticsApplication : Running with Spring Boot v3.0.6, Spring v6.0.8
2023-05-06T09:34:58.368+08:00 INFO 21000 --- [restartedMain] t.l.r.ReadStatisticsApplication : No active profile set, falling back to 1 default profile: "default"
2023-05-06T09:34:58.463+08:00 INFO 21000 --- [restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2023-05-06T09:34:58.463+08:00 INFO 21000 --- [restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2023-05-06T09:35:00.311+08:00 INFO 21000 --- [restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2023-05-06T09:35:00.332+08:00 INFO 21000 --- [restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2023-05-06T09:35:00.332+08:00 INFO 21000 --- [restartedMain] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.8]
2023-05-06T09:35:00.443+08:00 INFO 21000 --- [restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2023-05-06T09:35:00.444+08:00 INFO 21000 --- [restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1979 ms
2023-05-06T09:35:01.268+08:00 INFO 21000 --- [restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2023-05-06T09:35:01.561+08:00 INFO 21000 --- [restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2023-05-06T09:35:01.579+08:00 INFO 21000 --- [restartedMain] t.l.r.ReadStatisticsApplication : Started ReadStatisticsApplication in 4.02 seconds (process running for 4.714)
2023-05-06T09:35:11.574+08:00 INFO 21000 --- [http-nio-8080-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2023-05-06T09:35:11.575+08:00 INFO 21000 --- [http-nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2023-05-06T09:35:11.577+08:00 INFO 21000 --- [http-nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Completed initialization in 2 ms
2023-05-06T09:35:11.727+08:00 ERROR 21000 --- [http-nio-8080-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.sql.SQLException: No suitable driver found for ${spring.datasource.url}
### The error may exist in top/liangwy/read_statistics/dao/ScanMapper.xml
### The error may involve top.liangwy.read_statistics.dao.ScanMapper.getUserScanList
### The error occurred while executing a query
### Cause: java.sql.SQLException: No suitable driver found for ${spring.datasource.url}] with root cause
java.sql.SQLException: No suitable driver found for ${spring.datasource.url}
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:706) ~[java.sql:na]
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:190) ~[java.sql:na]
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:224) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:219) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:95) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:446) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:96) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:145) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:67) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:337) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:86) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:89) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:87) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) ~[mybatis-3.5.11.jar:3.5.11]
at jdk.proxy3/jdk.proxy3.$Proxy77.getUserScanList(Unknown Source) ~[na:na]
at top.liangwy.read_statistics.controller.ScanController.home(ScanController.java:45) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:207) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:152) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118) ~[spring-webmvc-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:884) ~[spring-webmvc-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) ~[spring-webmvc-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1081) ~[spring-webmvc-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:974) ~[spring-webmvc-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1011) ~[spring-webmvc-6.0.8.jar:6.0.8]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903) ~[spring-webmvc-6.0.8.jar:6.0.8]
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564) ~[tomcat-embed-core-10.1.8.jar:6.0]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[spring-webmvc-6.0.8.jar:6.0.8]
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) ~[tomcat-embed-core-10.1.8.jar:6.0]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) ~[tomcat-embed-websocket-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.8.jar:6.0.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.8.jar:6.0.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.8.jar:6.0.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-10.1.8.jar:10.1.8]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

@ -36,7 +36,11 @@
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.5.7</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
@ -48,6 +52,15 @@
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>mysql</groupId>-->
<!-- <artifactId>mysql-connector-java</artifactId>-->
<!-- <version>8.0.28</version>-->
<!-- </dependency>-->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
@ -61,7 +74,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.28</version>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>

@ -3,20 +3,22 @@ package top.liangwy.read_statistics.common;
public class BaseController {
// 云上伊川积分
public String[] free = { "梁文元", "闫露", "姜琰", "方伊东", "李元", "孙飞飞" };
// public String[] free = { "梁文元", "闫露", "姜琰", "方伊东", "李元", "孙飞飞" };
/**
* url
*/
public String url = "http://app2.dxhmt.cn:10329/system/uUser/list";
// public String url = "http://app2.dxhmt.cn:10329/system/uUser/list";
// 快手积分
public String ksFree = "Joy,5429264664,是姜姜呀呀,老方聊青铜,李元668,人生充满阳光715,陶利,郭明杰563,旷野幽兰50808," +
"吴晓晖,张建校,王晓华,钟响亮,田津辉,张睿祥.,韩晓娜,杨玉明,宁霞,cht135236,13608656363,13938862929,15038503566,王晓芳," +
"13938803441,李辉晓\uD83D\uDC83,";
// public String ksFree = "Joy,5429264664,是姜姜呀呀,老方聊青铜,李元668,人生充满阳光715,陶利,郭明杰563,旷野幽兰50808," +
// "吴晓晖,张建校,王晓华,钟响亮,田津辉,张睿祥.,韩晓娜,杨玉明,宁霞,cht135236,13608656363,13938862929,15038503566,王晓芳," +
// "13938803441,李辉晓\uD83D\uDC83,";
// 微信看一看
// public String ScanFree = "梁文元,闫露,姜琰,方伊东,李元,孙飞飞,陶利平,郭明杰,赵艳红,吴晓晖,张建校,王晓芳,";
public String ScanFree = "";
public String scanFree = "";
// 微博
public String WbFree = "孙飞32207,用户3hms2qw5ml,元元-ly,Joy-9716,姜姜_呦,大肋肋,小淘气rui,高静亚,小淘气rui,yiqili_,周雅丽yl,Mayajie3,赵yiman,用户928003530,用户7624278904,7728498387,";
public String wbFree ="";
// public String WbFree = "孙飞32207,用户3hms2qw5ml,元元-ly,Joy-9716,姜姜_呦,大肋肋,小淘气rui,高静亚,小淘气rui,yiqili_,周雅丽yl,Mayajie3,赵yiman,用户928003530,用户7624278904,7728498387,";
}

@ -15,9 +15,13 @@ import top.liangwy.read_statistics.pojo.Dept;
import top.liangwy.read_statistics.pojo.User;
import top.liangwy.read_statistics.pojo.Result.UserScan;
import top.liangwy.read_statistics.utils.MybatisUtils;
import java.time.LocalDateTime;
import java.util.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author lwy
* @
@ -26,8 +30,13 @@ import java.util.*;
@RequestMapping("/scan")
public class ScanController extends BaseController {
private static final Logger logger = LoggerFactory.getLogger(ScanController.class);
@GetMapping("/today")
public String home(Model model) {
logger.info("输出今天的微信再看名单");
SqlSession sqlSession = MybatisUtils.getSqlSession();
UserMapper userMapper = sqlSession.getMapper(UserMapper.class);
DeptMapper deptMapper = sqlSession.getMapper(DeptMapper.class);
@ -43,12 +52,13 @@ public class ScanController extends BaseController {
int minute = now.getMinute();
int second = now.getSecond();
String userScanString = scanMapper.getUserScanList();
System.out.println(year + "年" + month + "月" + day + "日 " + hour + "" + minute + "" + second +
logger.info(year + "年" + month + "月" + day + "日 " + hour + "" + minute + "" + second +
" 点击在看的人员是:" + userScanString);
if (null == userScanString) {
status = 1;
} else {
String newUserScanString = userScanString.replace(" ", "");
String[] a = newUserScanString.split(",");
model.addAttribute("date", year + "年" + month + "月" + day + "日");
@ -56,25 +66,25 @@ public class ScanController extends BaseController {
List<Dept> deptList = deptMapper.getAllDeptName();
// 创建有序键值对储存总的数据
Map<String, List<UserScan>> map = new LinkedHashMap<String, List<UserScan>>(deptList.size());
Map<String, List<UserScan>> map = new LinkedHashMap<>(deptList.size());
for (int i = 0; i < deptList.size(); i++) {
for (Dept dept : deptList) {
// 获取指定部门的人员信息
List<User> arrayList = userMapper.getUserByDeptId(deptList.get(i).getDeptId());
List<User> arrayList = userMapper.getUserByDeptId(dept.getDeptId());
List<UserScan> userList = new ArrayList<>();
for (int j = 0; j < arrayList.size(); j++) {
for (User user : arrayList) {
UserScan us = new UserScan();
us.setUserName(arrayList.get(j).getUserName());
for (int k = 0; k < a.length; k++) {
if (us.getUserName().equals(a[k])) {
us.setUserName(user.getUserName());
for (String s : a) {
if (us.getUserName().equals(s)) {
us.setScanStatus("已完成");
}
}
userList.add(us);
}
map.put(deptList.get(i).getDeptName(), userList);
map.put(dept.getDeptName(), userList);
}
sqlSession.close();
model.addAttribute("list", map);
@ -86,16 +96,18 @@ public class ScanController extends BaseController {
@RequestMapping("/insert")
public String edit(String userScanList, Model model) {
System.out.println("123insert");
SqlSession sqlSession = MybatisUtils.getSqlSession();
ScanMapper scanMapper = sqlSession.getMapper(ScanMapper.class);
String newUserScanList = ScanFree + userScanList;
String newUserScanList = scanFree + userScanList;
LocalDateTime now = LocalDateTime.now();
if (userScanList != null) {
int i = scanMapper.setUserScanList(newUserScanList);
if (i == 1) {
sqlSession.commit();
sqlSession.close();
logger.info(now.toLocalDate() + " " + now.toLocalTime().withNano(0) + " userScanList = " + userScanList);
model.addAttribute("info", "success");
}
}

@ -1,7 +1,7 @@
package top.liangwy.read_statistics.controller;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.session.SqlSession;
//import org.joda.time.DateTime;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@ -24,9 +24,12 @@ import java.util.*;
* @
*/
@Controller
@Slf4j
@RequestMapping("/wb")
public class WbController extends BaseController {
// private static final Logger logger = LoggerFactory.getLogger(WbController.class);
@GetMapping("/today")
public String today(Model model) {
@ -41,18 +44,13 @@ public class WbController extends BaseController {
int year = now.getYear();
int month = now.getMonthValue();
int day = now.getDayOfMonth();
int hour = now.getHour();
int minute = now.getMinute();
int second = now.getSecond();
String wbUserScanString = wbMapper.getWbUserScanList();
if (null == wbUserScanString) {
status = 1;
} else {
System.out
.println(year + "年" + month + "月" + day + "日 " + hour + "" + minute + "" + second +
" 微博点赞评论人员是:" + wbUserScanString);
String newWbUserScanString = WbFree + wbUserScanString.replace(" ", "");
System.out.println(newWbUserScanString);
log.info("微博点赞评论人员是:" + wbUserScanString);
String newWbUserScanString = wbFree + wbUserScanString.replace(" ", "");
log.info(newWbUserScanString);
String[] a = newWbUserScanString.split(",");
model.addAttribute("date", year + "年" + month + "月" + day + "日");
@ -60,28 +58,22 @@ public class WbController extends BaseController {
List<Dept> deptList = deptMapper.getAllDeptName();
// 创建有序键值对储存总的数据
Map<String, List<UserScan>> map = new LinkedHashMap<String, List<UserScan>>(deptList.size());
Map<String, List<UserScan>> map = new LinkedHashMap<>(deptList.size());
for (int i = 1; i < deptList.size(); i++) {
// 获取指定部门的人员信息
List<User> arrayList = userMapper.getUserByDeptId(deptList.get(i).getDeptId());
List<UserScan> userList = new ArrayList<>();
for (int j = 0; j < arrayList.size(); j++) {
if (i == 3) {
System.out.println(arrayList.get(j).getUserName());
System.out.println(arrayList.get(j).getWbNickName());
}
for (User user : arrayList) {
UserScan us = new UserScan();
us.setUserName(arrayList.get(j).getUserName());
us.setKsNickName(arrayList.get(j).getWbNickName());
for (int k = 0; k < a.length; k++) {
if (null == us.getKsNickName()) {
us.setKsNickName("");
us.setUserName(user.getUserName());
us.setNickName(user.getWbNickName());
for (String s : a) {
if (null == us.getNickName()) {
us.setNickName("");
}
if (us.getKsNickName().equals(a[k])) {
if (us.getNickName().equals(s)) {
us.setScanStatus("已完成");
}
}
@ -99,18 +91,25 @@ public class WbController extends BaseController {
@RequestMapping("/insert")
public String edit(String wbUserScanList, Model model) {
if (wbUserScanList == null) {
//正常get访问不用处理直接返回insert页
return "/wb/insert";
}
SqlSession sqlSession = MybatisUtils.getSqlSession();
WbMapper wbMapper = sqlSession.getMapper(WbMapper.class);
String newWbUserScanList = ScanFree + wbUserScanList;
System.out.println(wbUserScanList);
if (wbUserScanList != null) {
int i = wbMapper.setWbUserScanList(newWbUserScanList);
if (i == 1) {
sqlSession.commit();
sqlSession.close();
model.addAttribute("info", "success");
}
//因为微博复制出来的有两个空行,去掉后再存入数据库
log.info("前端页面传入的wbUserScanList: " + wbUserScanList);
String str = wbUserScanList.replace("\r\n\r\n", ",");
String newWbUserScanList = wbFree + str;
log.info("准备要输入数据库中的newWbUserScanList: " + newWbUserScanList);
int i = wbMapper.setWbUserScanList(newWbUserScanList);
if (i == 1) {
//插入成功
sqlSession.commit();
sqlSession.close();
model.addAttribute("info", "success");
}
sqlSession.close();
return "/wb/insert";

@ -7,7 +7,10 @@ import lombok.Data;
*/
@Data
public class UserScan {
//用户名
private String userName;
private String ksNickName;
//昵称
private String nickName;
//浏览状态
private String scanStatus;
}

@ -0,0 +1,23 @@
server:
port: 8080
logging:
# file:
# path: D:\log
# name: myapp.log
level:
root: INFO
org.springframework: info
top.liangwy: debug
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://39.97.211.66:3306/dblwy?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
username: DBLwy
password: tx8yH88dJseWt72x
mybatis:
type-aliases-package: top.liangwy.read_statistics.cyc.pojo
mapper-locations: classpath:/dao/*.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%highlight%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/myapp.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>logs/myapp.%d{yyyy-MM-dd}.log</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="CONSOLE" />
<appender-ref ref="FILE" />
</root>
</configuration>

@ -11,6 +11,10 @@
<property name="url" value="jdbc:mysql://39.97.211.66/dblwy?useUnicode=true&amp;characterEncoding=UTF-8&amp;serverTimezone=Asia/Shanghai"/>
<property name="username" value="DBLwy"/>
<property name="password" value="tx8yH88dJseWt72x"/>
<!-- <property name="driver" value="${spring.datasource.driver-class-name}"/>-->
<!-- <property name="url" value="${spring.datasource.url}" />-->
<!-- <property name="username" value="${spring.datasource.username}" />-->
<!-- <property name="password" value="${spring.datasource.password}" />-->
<property name="poolPingQuery" value="SELECT NOW()" />
<property name="poolPingEnabled" value="true" />
</dataSource>

Loading…
Cancel
Save