org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayWrapper': Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Found non-empty schema(s) `boss` without metadata table! Use baseline() or set baselineOnMigrate to true to initialize the metadata table.
flyway.setBaselineOnMigrate(true);//initOnMigrate
ERROR Application startup failed - (SpringApplication.java:839) 18:14:29,781 [main]
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'indexController': Unsatisfied dependency expressed through field 'weiXinService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'weiXinService': Unsatisfied dependency expressed through field 'dbManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbManager': Invocation of init method failed; nested exception is java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no leveldbjni64-1.8 in java.library.path, no leveldbjni-1.8 in java.library.path, no leveldbjni in java.library.path, C:UsersendvAppDataLocalTempleveldbjni-64-1-2446148662175980479.8: Can't find dependent libraries]
错误应用程序启动失败-(SpRelpApvest.java:839)18:14:29 78[主]
org.springframework.beans.factory.unsuspeedPendencyException:创建名为“indexController”的bean时出错:通过字段“weixinservice”表示的依赖项不满意;嵌套异常为org.springframework.beans.factory.unsuspeedPendencyException:创建名为“wei”的bean时出错xinservice”:通过字段“dbmanager”表示的依赖项不满足;嵌套异常为org.springframework.beans.factory.beanCreationException:创建名为“dbmanager”的bean时出错:调用init方法失败;嵌套异常为java.lang.unsuspendedlinkError:无法加载库原因:【java.library.path中没有levelbjni64-1.8,java.library.path中没有levelbjni-1.8,java.library.path中没有levelbjni,c:usersendvappdatalocal emplevelbjni-64-1-2446148662175980479.8:找不到依赖库】
只需要把leveldbjni-win64-1.8.jar导入工程即可(应为在win64下运行的)
设置项目maven依赖:
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<artifactId>leveldbjni-win64</artifactId>
<version>-master-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<artifactId>leveldbjni</artifactId>
<version>-master-SNAPSHOT</version>
</dependency>
Gradle管理项目,在项目build.gradle的dependencies中添加
- compile "org.fusesource.leveldbjni:leveldbjni:1.8"
- compile "org.fusesource.leveldbjni:leveldbjni-win64:1.8"