我这边频道管理项目IDEA直接运行没有问题,java-jar方式启动就报错

莫语 2023-3-31 346

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'wxMpMessageRouterConfiguration' defined in URL [jar:file:/E:/projects/Dianxianmian/youquan/im_channel_manage/server/target/channel-server-0.1.2.jar!/BO
OT-INF/classes!/com/github/niefy/modules/wx/config/WxMpMessageRouterConfiguration.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'logHandler': Unsatisfied dependency expressed through field 'wxMsgService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'wxMsgService': Unsatisfied dep
endency expressed through field 'wxAccountService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wxAccountService': Invocation of init method failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:
### Error querying database.  Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
### The error may exist in com/github/niefy/modules/wx/dao/WxAccountMapper.java (best guess)
### The error may involve com.github.niefy.modules.wx.dao.WxAccountMapper.selectList
### The error occurred while executing a query
### SQL: SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account
### Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
; bad SQL grammar []; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.16.jar!/:5.3.16]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.16.jar!/:5.3.16]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.4.jar!/:2.6.4]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) [spring-boot-2.6.4.jar!/:2.6.4]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415) [spring-boot-2.6.4.jar!/:2.6.4]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-2.6.4.jar!/:2.6.4]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) [spring-boot-2.6.4.jar!/:2.6.4]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) [spring-boot-2.6.4.jar!/:2.6.4]
        at com.github.niefy.BootApplication.main(BootApplication.java:15) [classes!/:0.1.2]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_361]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_361]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_361]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_361]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) [channel-server-0.1.2.jar:0.1.2]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) [channel-server-0.1.2.jar:0.1.2]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) [channel-server-0.1.2.jar:0.1.2]
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) [channel-server-0.1.2.jar:0.1.2]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'logHandler': Unsatisfied dependency expressed through field 'wxMsgService'; nested exception is org.springframework.beans.factory.Unsatisfie
dDependencyException: Error creating bean with name 'wxMsgService': Unsatisfied dependency expressed through field 'wxAccountService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wxAccountService': Invocation of init method failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:
### Error querying database.  Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
### The error may exist in com/github/niefy/modules/wx/dao/WxAccountMapper.java (best guess)
### The error may involve com.github.niefy.modules.wx.dao.WxAccountMapper.selectList
### The error occurred while executing a query
### SQL: SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account
### Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
; bad SQL grammar []; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:659) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.16.jar!/:5.3.16]
        ... 27 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'wxMsgService': Unsatisfied dependency expressed through field 'wxAccountService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wxAccountService': Invocation of init method failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:
### Error querying database.  Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
### The error may exist in com/github/niefy/modules/wx/dao/WxAccountMapper.java (best guess)
### The error may involve com.github.niefy.modules.wx.dao.WxAccountMapper.selectList
### The error occurred while executing a query
### SQL: SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account
### Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
; bad SQL grammar []; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:659) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:656) ~[spring-beans-5.3.16.jar!/:5.3.16]
        ... 42 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wxAccountService': Invocation of init method failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:
### Error querying database.  Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
### The error may exist in com/github/niefy/modules/wx/dao/WxAccountMapper.java (best guess)
### The error may involve com.github.niefy.modules.wx.dao.WxAccountMapper.selectList
### The error occurred while executing a query
### SQL: SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account
### Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
; bad SQL grammar []; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:656) ~[spring-beans-5.3.16.jar!/:5.3.16]
        ... 56 common frames omitted
Caused by: org.springframework.jdbc.BadSqlGrammarException:
### Error querying database.  Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
### The error may exist in com/github/niefy/modules/wx/dao/WxAccountMapper.java (best guess)
### The error may involve com.github.niefy.modules.wx.dao.WxAccountMapper.selectList
### The error occurred while executing a query
### SQL: SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account
### Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
; bad SQL grammar []; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
        at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239) ~[spring-jdbc-5.3.16.jar!/:5.3.16]
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70) ~[spring-jdbc-5.3.16.jar!/:5.3.16]
        at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91) ~[mybatis-spring-2.0.6.jar!/:2.0.6]
        at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441) ~[mybatis-spring-2.0.6.jar!/:2.0.6]
        at com.sun.proxy.$Proxy84.selectList(Unknown Source) ~[na:na]
        at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:224) ~[mybatis-spring-2.0.6.jar!/:2.0.6]
        at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.executeForMany(MybatisMapperMethod.java:166) ~[mybatis-plus-core-3.5.1.jar!/:3.5.1]
        at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:77) ~[mybatis-plus-core-3.5.1.jar!/:3.5.1]
        at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148) ~[mybatis-plus-core-3.5.1.jar!/:3.5.1]
        at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89) ~[mybatis-plus-core-3.5.1.jar!/:3.5.1]
        at com.sun.proxy.$Proxy144.selectList(Unknown Source) ~[na:na]
        at com.baomidou.mybatisplus.extension.service.IService.list(IService.java:370) ~[mybatis-plus-extension-3.5.1.jar!/:3.5.1]
        at com.baomidou.mybatisplus.extension.service.IService.list(IService.java:379) ~[mybatis-plus-extension-3.5.1.jar!/:3.5.1]
        at com.github.niefy.modules.wx.service.impl.WxAccountServiceImpl.loadWxMpConfigStorages(WxAccountServiceImpl.java:65) ~[classes!/:0.1.2]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_361]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_361]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_361]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_361]
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:389) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:333) ~[spring-beans-5.3.16.jar!/:5.3.16]
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:157) ~[spring-beans-5.3.16.jar!/:5.3.16]
        ... 68 common frames omitted
Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "WX_ACCOUNT" not found; SQL statement:
SELECT  appid,name,imurl,type,verified,secret,token,aes_key  FROM wx_account [42102-200]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:453) ~[h2-1.4.200.jar!/:na]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:429) ~[h2-1.4.200.jar!/:na]
        at org.h2.message.DbException.get(DbException.java:205) ~[h2-1.4.200.jar!/:na]
        at org.h2.message.DbException.get(DbException.java:181) ~[h2-1.4.200.jar!/:na]
        at org.h2.command.Parser.readTableOrView(Parser.java:7628) ~[h2-1.4.200.jar!/:na]
        at org.h2.command.Parser.readTableFilter(Parser.java:1970) ~[h2-1.4.200.jar!/:na]
        at org.h2.command.Parser.parseSelectFromPart(Parser.java:2827) ~[h2-1.4.200.jar!/:na]
        at org.h2.command.Parser.parseSelect(Parser.java:2959) ~[h2-1.4.200.jar!/:na]
        at org.h2.command.Parser.parseQuerySub(Parser.java:2817) ~[h2-1.4.200.jar!/:na]
        at org.h2.command.Parser.parseSelectUnion(Parser.java:2649) ~[h2-1.4.200.jar!/:na]
        at org.h2.command.Parser.parseQuery(Parser.java:2620) ~[h2-1.4.200.jar!/:na]
        at org.h2.command.Parser.parsePrepared(Parser.java:868) ~[h2-1.4.200.jar!/:na]
        at org.h2.command.Parser.parse(Parser.java:843) ~[h2-1.4.200.jar!/:na]
        at org.h2.command.Parser.parse(Parser.java:815) ~[h2-1.4.200.jar!/:na]
        at org.h2.command.Parser.prepareCommand(Parser.java:738) ~[h2-1.4.200.jar!/:na]
        at org.h2.engine.Session.prepareLocal(Session.java:657) ~[h2-1.4.200.jar!/:na]
        at org.h2.engine.Session.prepareCommand(Session.java:595) ~[h2-1.4.200.jar!/:na]
最新回复 (4)
  • 莫语 2023-3-31
    引用 2

    数据库也切换成mysql了

    # 开发时使用h2db数据库,上线时需要切换到mysql。切换时把下面mysql相关的datasource打开,注释掉h2相关的datasource全部注释掉(包括password下面的几行)。切换到mysql需要手动创建数据库,然后执行resource目录下的sql语句。
    #    测试库
        datasource:
            driver-class-name: com.mysql.cj.jdbc.Driver
            url: jdbc:mysql://${MYSQL_IP:localhost}:${MYSQL_PORT:3306}/${MYSQL_DB:wx}?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
            username: ${MYSQL_USERNAME:root}
            password: ${MYSQL_PASSWORD:rootlocal}
    
    #        正式库
    #    datasource:
    #        driver-class-name: com.mysql.cj.jdbc.Driver
    #        url: jdbc:mysql://${MYSQL_IP:localhost}:${MYSQL_PORT:3306}/${MYSQL_DB:yq_im_channel}?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
    #        username: ${MYSQL_USERNAME:yq_im_channel}
    #        password: ${MYSQL_PASSWORD:rdC6m5jiiK5KpJnP}
    
    #    datasource:
    #        driver-class-name: org.h2.Driver
    #        url: jdbc:h2:file:./channel_server;AUTO_SERVER=TRUE;MODE=MySQL
    #        username: sa
    #        password:
    #        initialization-mode: always
    #        data: classpath:sql/data.sql
    #        continue-on-error: true
    
  • x86 2023-3-31
    引用 3

    data: classpath:sql/data.sql

    这行别注释了,加上试试

  • HeavyRain 2023-3-31
    引用 4
    "切换到mysql需要手动创建数据库,然后执行resource目录下的sql语句"

    注释中有这句话,需要手动创建数据库并执行初始化sql语句
  • 莫语 2023-4-1
    引用 5
    已处理,找到问题了,config没有复制
返回