SpringBoot 多数据源 java.lang.IllegalArgumentException: At least one JPA metamodel must be present!

java.lang.IllegalArgumentException: At least one JPA metamodel must be present!

启动类Application加上

@EnableAutoConfiguration(exclude={    
      JpaRepositoriesAutoConfiguration.class //禁止springboot自动加载持久化bean  
        })   

即可解决
最近刚刚完成数据库的多数据源的项目,也是踩了很多坑,不过也填了很多坑,哈哈。

猜你喜欢

转载自blog.csdn.net/wangjie919/article/details/80347375
今日推荐