入库验证成功

master
Bbt 3 weeks ago
parent bd10af974c
commit 4f03958855

@ -0,0 +1,332 @@
2024-10-23 17:20:53.969 ERROR 30428 --- [main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'schuedingConfig': Unsatisfied dependency expressed through field 'fileProcessor'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fileProcessor': Unsatisfied dependency expressed through field 'transitDoorRecordService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'transitDoorRecordServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.watu.mapper.TransitDoorRecordMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1425)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at com.watu.SySaveRecordApplication.main(SySaveRecordApplication.java:18)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fileProcessor': Unsatisfied dependency expressed through field 'transitDoorRecordService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'transitDoorRecordServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.watu.mapper.TransitDoorRecordMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1425)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657)
... 21 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'transitDoorRecordServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.watu.mapper.TransitDoorRecordMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1425)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657)
... 35 common frames omitted
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.watu.mapper.TransitDoorRecordMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1717)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1273)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657)
... 49 common frames omitted
2024-10-23 17:23:33.134 ERROR 30092 --- [main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fileProcessor': Unsatisfied dependency expressed through field 'transitDoorRecordService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'transitDoorRecordServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.watu.mapper.TransitDoorRecordMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1425)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at com.watu.SySaveRecordApplication.main(SySaveRecordApplication.java:18)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'transitDoorRecordServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.watu.mapper.TransitDoorRecordMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1425)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657)
... 21 common frames omitted
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.watu.mapper.TransitDoorRecordMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1717)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1273)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657)
... 35 common frames omitted
2024-10-23 17:47:01.332 ERROR 18108 --- [scheduling-1] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'watu4'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:871)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1714)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1224)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2199)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2230)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2025)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:778)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:358)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:477)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:560)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:158)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:116)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:80)
at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:67)
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:337)
at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.prepareStatement(MybatisSimpleExecutor.java:93)
at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doQuery(MybatisSimpleExecutor.java:68)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
at com.baomidou.mybatisplus.core.executor.MybatisCachingExecutor.query(MybatisCachingExecutor.java:165)
at com.baomidou.mybatisplus.core.executor.MybatisCachingExecutor.query(MybatisCachingExecutor.java:92)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)
at com.sun.proxy.$Proxy57.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:223)
at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.executeForMany(MybatisMapperMethod.java:173)
at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:78)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
at com.sun.proxy.$Proxy61.selectList(Unknown Source)
at com.baomidou.mybatisplus.extension.service.IService.list(IService.java:279)
at com.baomidou.mybatisplus.extension.service.IService.list(IService.java:288)
at com.baomidou.mybatisplus.extension.service.IService$$FastClassBySpringCGLIB$$f8525d18.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:687)
at com.watu.service.impl.TbDeviceInfoServiceImpl$$EnhancerBySpringCGLIB$$28f3fb04.list(<generated>)
at com.watu.config.SchuedingConfig.updateDeviceInfo(SchuedingConfig.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset$$$capture(FutureTask.java:308)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2024-10-23 17:47:01.335 ERROR 18108 --- [scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHandler : Unexpected error occurred in scheduled task
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'watu4'
### The error may exist in com/watu/mapper/TbDeviceInfoMapper.java (best guess)
### The error may involve com.watu.mapper.TbDeviceInfoMapper.selectList
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'watu4'
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)
at com.sun.proxy.$Proxy57.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:223)
at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.executeForMany(MybatisMapperMethod.java:173)
at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:78)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
at com.sun.proxy.$Proxy61.selectList(Unknown Source)
at com.baomidou.mybatisplus.extension.service.IService.list(IService.java:279)
at com.baomidou.mybatisplus.extension.service.IService.list(IService.java:288)
at com.baomidou.mybatisplus.extension.service.IService$$FastClassBySpringCGLIB$$f8525d18.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:687)
at com.watu.service.impl.TbDeviceInfoServiceImpl$$EnhancerBySpringCGLIB$$28f3fb04.list(<generated>)
at com.watu.config.SchuedingConfig.updateDeviceInfo(SchuedingConfig.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset$$$capture(FutureTask.java:308)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'watu4'
### The error may exist in com/watu/mapper/TbDeviceInfoMapper.java (best guess)
### The error may involve com.watu.mapper.TbDeviceInfoMapper.selectList
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'watu4'
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:149)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)
... 28 common frames omitted
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'watu4'
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82)
at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:80)
at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:67)
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:337)
at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.prepareStatement(MybatisSimpleExecutor.java:93)
at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doQuery(MybatisSimpleExecutor.java:68)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
at com.baomidou.mybatisplus.core.executor.MybatisCachingExecutor.query(MybatisCachingExecutor.java:165)
at com.baomidou.mybatisplus.core.executor.MybatisCachingExecutor.query(MybatisCachingExecutor.java:92)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
... 34 common frames omitted
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'watu4'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:871)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1714)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1224)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2199)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2230)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2025)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:778)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:358)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:477)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:560)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:158)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:116)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
... 44 common frames omitted
2024-10-23 17:51:57.726 ERROR 10100 --- [pool-2-thread-1] com.watu.service.FileProcessor : 处理4.0版本文件失败: DoorEvent_WT_32092351011518050001_1729648085_94829_0000005.bcp
java.lang.ArrayIndexOutOfBoundsException: 19
at com.watu.service.FileProcessor.savedoorrecord(FileProcessor.java:102)
at com.watu.service.FileProcessor.lambda$processV4Files$0(FileProcessor.java:55)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at com.watu.service.FileProcessor.processV4Files(FileProcessor.java:47)
at com.watu.config.SchuedingConfig.lambda$checkFaceOrBcp$1(SchuedingConfig.java:88)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2024-10-23 17:52:07.715 ERROR 10100 --- [pool-2-thread-2] com.watu.service.FileProcessor : 处理4.0版本文件失败: DoorEvent_WT_32092351011518050001_1729648085_94829_0000005.bcp
java.lang.ArrayIndexOutOfBoundsException: 19
at com.watu.service.FileProcessor.savedoorrecord(FileProcessor.java:102)
at com.watu.service.FileProcessor.lambda$processV4Files$0(FileProcessor.java:55)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at com.watu.service.FileProcessor.processV4Files(FileProcessor.java:47)
at com.watu.config.SchuedingConfig.lambda$checkFaceOrBcp$1(SchuedingConfig.java:88)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2024-10-23 17:55:56.791 ERROR 29652 --- [pool-2-thread-1] com.watu.service.FileProcessor : 删除文件失败文件名称DoorEvent_WT_32092351011518050001_1729648085_94829_0000005.bcp
2024-10-23 17:56:06.655 ERROR 29652 --- [pool-2-thread-2] com.watu.service.FileProcessor : 删除文件失败文件名称DoorEvent_WT_32092351011518050001_1729648085_94829_0000005.bcp

@ -0,0 +1,67 @@
2024-10-23 17:20:51.190 INFO 30428 --- [main] com.watu.SySaveRecordApplication : Starting SySaveRecordApplication on DerZhang with PID 30428 (F:\A1\SY-saverecord\target\classes started by 章北海 in F:\A1\SY-saverecord)
2024-10-23 17:20:51.196 INFO 30428 --- [main] com.watu.SySaveRecordApplication : The following profiles are active: pro,test
2024-10-23 17:20:53.362 INFO 30428 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2024-10-23 17:20:53.363 INFO 30428 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.43]
2024-10-23 17:20:53.479 INFO 30428 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2024-10-23 17:20:53.910 INFO 30428 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2024-10-23 17:23:31.049 INFO 30092 --- [main] com.watu.SySaveRecordApplication : Starting SySaveRecordApplication on DerZhang with PID 30092 (F:\A1\SY-saverecord\target\classes started by 章北海 in F:\A1\SY-saverecord)
2024-10-23 17:23:31.059 INFO 30092 --- [main] com.watu.SySaveRecordApplication : The following profiles are active: pro,test
2024-10-23 17:23:32.889 INFO 30092 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2024-10-23 17:23:32.890 INFO 30092 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.43]
2024-10-23 17:23:32.982 INFO 30092 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2024-10-23 17:23:33.076 INFO 30092 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2024-10-23 17:25:15.296 INFO 8912 --- [main] com.watu.SySaveRecordApplication : Starting SySaveRecordApplication on DerZhang with PID 8912 (F:\A1\SY-saverecord\target\classes started by 章北海 in F:\A1\SY-saverecord)
2024-10-23 17:25:15.304 INFO 8912 --- [main] com.watu.SySaveRecordApplication : The following profiles are active: pro,test
2024-10-23 17:25:17.158 INFO 8912 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2024-10-23 17:25:17.158 INFO 8912 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.43]
2024-10-23 17:25:17.254 INFO 8912 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2024-10-23 17:25:18.963 INFO 8912 --- [main] com.watu.SySaveRecordApplication : Started SySaveRecordApplication in 5.564 seconds (JVM running for 7.392)
2024-10-23 17:26:36.442 INFO 28756 --- [main] com.watu.SySaveRecordApplication : Starting SySaveRecordApplication on DerZhang with PID 28756 (F:\A1\SY-saverecord\target\classes started by 章北海 in F:\A1\SY-saverecord)
2024-10-23 17:26:36.446 INFO 28756 --- [main] com.watu.SySaveRecordApplication : The following profiles are active: pro,test
2024-10-23 17:26:38.071 INFO 28756 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2024-10-23 17:26:38.071 INFO 28756 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.43]
2024-10-23 17:26:38.227 INFO 28756 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2024-10-23 17:26:41.329 INFO 28756 --- [main] com.watu.SySaveRecordApplication : Started SySaveRecordApplication in 5.716 seconds (JVM running for 8.937)
2024-10-23 17:46:55.158 INFO 18108 --- [main] com.watu.SySaveRecordApplication : Starting SySaveRecordApplication on DerZhang with PID 18108 (F:\A1\SY-saverecord\target\classes started by 章北海 in F:\A1\SY-saverecord)
2024-10-23 17:46:55.162 INFO 18108 --- [main] com.watu.SySaveRecordApplication : The following profiles are active: pro,test
2024-10-23 17:46:56.306 INFO 18108 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2024-10-23 17:46:56.307 INFO 18108 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.43]
2024-10-23 17:46:56.467 INFO 18108 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2024-10-23 17:46:58.743 INFO 18108 --- [main] com.watu.SySaveRecordApplication : Started SySaveRecordApplication in 4.189 seconds (JVM running for 4.879)
2024-10-23 17:46:59.789 INFO 18108 --- [scheduling-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2024-10-23 17:47:53.396 INFO 7336 --- [main] com.watu.SySaveRecordApplication : Starting SySaveRecordApplication on DerZhang with PID 7336 (F:\A1\SY-saverecord\target\classes started by 章北海 in F:\A1\SY-saverecord)
2024-10-23 17:47:53.403 INFO 7336 --- [main] com.watu.SySaveRecordApplication : The following profiles are active: pro,test
2024-10-23 17:47:54.292 INFO 7336 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2024-10-23 17:47:54.292 INFO 7336 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.43]
2024-10-23 17:47:54.342 INFO 7336 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2024-10-23 17:47:55.553 INFO 7336 --- [main] com.watu.SySaveRecordApplication : Started SySaveRecordApplication in 2.675 seconds (JVM running for 3.358)
2024-10-23 17:47:56.595 INFO 7336 --- [scheduling-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2024-10-23 17:47:56.938 INFO 7336 --- [scheduling-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2024-10-23 17:49:16.808 INFO 7336 --- [SpringContextShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2024-10-23 17:49:16.818 INFO 7336 --- [SpringContextShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
2024-10-23 17:51:53.372 INFO 10100 --- [main] com.watu.SySaveRecordApplication : Starting SySaveRecordApplication on DerZhang with PID 10100 (F:\A1\SY-saverecord\target\classes started by 章北海 in F:\A1\SY-saverecord)
2024-10-23 17:51:53.374 INFO 10100 --- [main] com.watu.SySaveRecordApplication : The following profiles are active: pro,test
2024-10-23 17:51:54.221 INFO 10100 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2024-10-23 17:51:54.222 INFO 10100 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.43]
2024-10-23 17:51:54.285 INFO 10100 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2024-10-23 17:51:55.452 INFO 10100 --- [main] com.watu.SySaveRecordApplication : Started SySaveRecordApplication in 2.462 seconds (JVM running for 3.433)
2024-10-23 17:51:57.209 INFO 10100 --- [scheduling-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2024-10-23 17:51:57.457 INFO 10100 --- [scheduling-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2024-10-23 17:51:57.705 INFO 10100 --- [pool-2-thread-1] com.watu.service.FileProcessor : 检测到4.0版本文件: 1
2024-10-23 17:52:07.704 INFO 10100 --- [pool-2-thread-2] com.watu.service.FileProcessor : 检测到4.0版本文件: 1
2024-10-23 17:52:12.943 INFO 10100 --- [SpringContextShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2024-10-23 17:52:12.948 INFO 10100 --- [SpringContextShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
2024-10-23 17:55:52.349 INFO 29652 --- [main] com.watu.SySaveRecordApplication : Starting SySaveRecordApplication on DerZhang with PID 29652 (F:\A1\SY-saverecord\target\classes started by 章北海 in F:\A1\SY-saverecord)
2024-10-23 17:55:52.352 INFO 29652 --- [main] com.watu.SySaveRecordApplication : The following profiles are active: pro,test
2024-10-23 17:55:53.044 INFO 29652 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2024-10-23 17:55:53.044 INFO 29652 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.43]
2024-10-23 17:55:53.094 INFO 29652 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2024-10-23 17:55:54.338 INFO 29652 --- [main] com.watu.SySaveRecordApplication : Started SySaveRecordApplication in 2.334 seconds (JVM running for 3.104)
2024-10-23 17:55:56.220 INFO 29652 --- [scheduling-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2024-10-23 17:55:56.406 INFO 29652 --- [scheduling-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2024-10-23 17:55:56.578 INFO 29652 --- [pool-2-thread-1] com.watu.service.FileProcessor : 检测到4.0版本文件: 1
2024-10-23 17:55:56.790 INFO 29652 --- [pool-2-thread-1] com.watu.service.FileProcessor : 处理4.0版本文件成功: DoorEvent_WT_32092351011518050001_1729648085_94829_0000005.bcp
2024-10-23 17:56:06.592 INFO 29652 --- [pool-2-thread-2] com.watu.service.FileProcessor : 检测到4.0版本文件: 1
2024-10-23 17:56:06.655 INFO 29652 --- [pool-2-thread-2] com.watu.service.FileProcessor : 处理4.0版本文件成功: DoorEvent_WT_32092351011518050001_1729648085_94829_0000005.bcp
2024-10-23 17:56:13.026 INFO 29652 --- [SpringContextShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2024-10-23 17:56:13.031 INFO 29652 --- [SpringContextShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.

@ -1,5 +1,6 @@
package com.watu;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
@ -11,6 +12,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
*/
@SpringBootApplication
@EnableScheduling
@MapperScan("com.watu.mapper")
public class SySaveRecordApplication {
public static void main(String[] args) {
SpringApplication.run(SySaveRecordApplication.class, args);

@ -14,13 +14,5 @@ import org.springframework.stereotype.Component;
@ConfigurationProperties(prefix = "root")
public class RootConfig {
private String path;
private String nephropathic;
private String base64path;
private String lyypath;
private String ip;
private String port;
private String cron;
private String ftpflag;
private String twoeyflag;
private String scmsflag;
}

@ -1,9 +1,12 @@
package com.watu.config;
import com.alibaba.fastjson.JSON;
import com.watu.pojo.TbDeviceInfo;
import com.watu.service.FileProcessor;
import com.watu.service.TbDeviceInfoService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@ -23,16 +26,13 @@ import java.util.stream.Collectors;
* @Version 1.0
*/
@Component
@RequiredArgsConstructor
public class SchuedingConfig {
@Autowired
private StringRedisTemplate redisTemplate;
@Autowired
private FileProcessor fileProcessor;
@Autowired
private RootConfig rootConfig;
@Autowired
private TbDeviceInfoService tbDeviceInfoService;
private final StringRedisTemplate redisTemplate;
private final FileProcessor fileProcessor;
private final RootConfig rootConfig;
private final TbDeviceInfoService tbDeviceInfoService;
private final ExecutorService executorService = Executors.newFixedThreadPool(10);
private final ConcurrentHashMap<String, Boolean> processedFiles = new ConcurrentHashMap<>();
@ -48,6 +48,10 @@ public class SchuedingConfig {
*/
@Scheduled(initialDelay = 1000, fixedRate = 30000)
public void updateDeviceInfo() {
//判断redis中是否有设备信息如果没有则从数据库中获取
if (redisTemplate.opsForHash().size("deviceChannels") == 0) {
return;
}
//TODO
String redisKey = "deviceChannels";
List<TbDeviceInfo> list = tbDeviceInfoService.list();
@ -73,7 +77,7 @@ public class SchuedingConfig {
* @time 2024/10/22 11:30
* bcpbcpmysql
*/
@Scheduled(cron = "0 0/5 * * * ?")
@Scheduled(initialDelay = 1000, fixedDelay = 10000)
public void checkFaceOrBcp(){
//TODO
System.out.println("定时检测指定文件夹下的人脸或者bcp文件判断是否符合规范解析bcp存入mysql数据库");

@ -55,6 +55,10 @@ public class TbPlaceInfo implements Serializable {
*
*/
private Integer placeNature;
/**
*
*/
private Integer buildNum;
/**
*
*/

@ -1,6 +1,7 @@
package com.watu.service;
import com.alibaba.fastjson.JSON;
import com.watu.config.RootConfig;
import com.watu.pojo.TbDeviceInfo;
import com.watu.pojo.TransitDoorRecord;
import com.watu.pojo.TransitUserRecord;
@ -11,8 +12,13 @@ import org.springframework.stereotype.Service;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.text.SimpleDateFormat;
import java.util.Base64;
import java.util.Date;
import java.util.List;
@ -31,6 +37,8 @@ public class FileProcessor {
private TransitUserRecordService transitUserRecordService;
@Autowired
private StringRedisTemplate redisTemplate;
@Autowired
private RootConfig rootConfig;
private static final SimpleDateFormat ymd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@ -51,6 +59,12 @@ public class FileProcessor {
log.info("处理4.0版本文件成功: {}", file.getName());
} catch (Exception e) {
log.error("处理4.0版本文件失败: {}", file.getName(), e);
} finally {
if (file.delete()){
log.info("删除文件成功: {}", file.getName());
}else {
log.error("删除文件失败: {}", file.getName());
}
}
});
}
@ -88,16 +102,16 @@ public class FileProcessor {
//从报文中获取
Long sendtime = Long.parseLong(split[2]);
transitDoorRecord.setPersonPic(split[14]);
transitDoorRecord.setPersonPic(creatpic(split[14],"door"));
transitDoorRecord.setUserName(split[7]);
transitDoorRecord.setOpenResult(split[12]);
transitDoorRecord.setCardType(split[19]);
transitDoorRecord.setCardType(split[13]);
transitDoorRecord.setPassTime(sendtime);
transitDoorRecord.setPartitionField(new Date(sendtime * 1000));
transitDoorRecord.setCreateTime(new Date(nowtime));
transitDoorRecord.setUpdateTime(new Date(nowtime));
transitDoorRecord.setIsActive(1);
transitDoorRecordService.save(transitDoorRecord);
}
/**
@ -133,8 +147,8 @@ public class FileProcessor {
//从报文中获取
Long sendtime = Long.parseLong(split[2]);
transitUserRecord.setGlobalPic(split[5]);
transitUserRecord.setPersonPic(split[6]);
transitUserRecord.setGlobalPic(creatpic(split[5],"face"));
transitUserRecord.setPersonPic(creatpic(split[6],"face"));
transitUserRecord.setIdCard(split[7]);
transitUserRecord.setUserName(split[8]);
transitUserRecord.setPassTime(sendtime);
@ -160,9 +174,28 @@ public class FileProcessor {
* @time 2024/10/23 14:59
* base64
*/
public String creatpic(String base64){
public String creatpic(String data , String type){
//TODO
return null;
String base64path = rootConfig.getBase64path();
String base64pathname = base64path + File.separator + type + File.separator + System.currentTimeMillis() + ".jpg";
try {
//根据绝对路径生成文件夹,并且产生文件
Path filePath = Paths.get(base64pathname);
if (!Files.exists(filePath.getParent())) {
Files.createDirectories(filePath.getParent());
System.out.println("路径已创建");
} else {
System.out.println("路径已存在");
}
byte[] imageBytes = Base64.getDecoder().decode(data);
File outputFile = new File(base64pathname);
java.nio.file.Files.write(outputFile.toPath(), imageBytes);
System.out.println("图片保存成功!" + base64pathname);
return base64pathname;
} catch (IOException e) {
System.out.println("保存图片时出现错误:" + e.getMessage());
return "";
}
}
/**

@ -10,18 +10,15 @@ spring:
banner-mode: off
datasource:
driverClassName: com.mysql.jdbc.Driver
# url: jdbc:mysql://1.94.45.26:10007/watu4?serverTimezone=GMT%2B8&useSSL=false&useUnicode=true&characterEncoding=utf8&max_allowed_packet=1048576
# url: jdbc:mysql://127.0.0.1:55306/watu4?serverTimezone=GMT%2B8&useSSL=false&useUnicode=true&characterEncoding=utf8&max_allowed_packet=1048576
# url: jdbc:mysql://192.168.0.11:55306/watu4?serverTimezone=GMT%2B8&useSSL=false&useUnicode=true&characterEncoding=utf8&max_allowed_packet=1048576
url: jdbc:mysql://192.168.0.38:55306/watu4?serverTimezone=GMT%2B8&useSSL=false&useUnicode=true&characterEncoding=utf8&max_allowed_packet=1048576
url: jdbc:mysql://192.168.0.10:55306/syry?serverTimezone=GMT%2B8&useSSL=false&useUnicode=true&characterEncoding=utf8&max_allowed_packet=1048576
username: root
password: '!QAZ1qaz'
redis:
database: 15
# host: 1.94.45.26
host: 192.168.0.38
host: 192.168.0.10
# host: 127.0.0.1
# port: 10052
port: 26379
password: livegbs@2019
mybatis-plus:
@ -37,3 +34,6 @@ logging:
level:
root: info
org.apache.kafka: error
root:
path: F:\A1\sybcp
base64path: F:\A1\picdata
Loading…
Cancel
Save