SpringBoot启动报:Caused by: java.lang.IllegalArgumentException: At least one JPA metamodel must be present!
使用spring boot对项目改造,启动报错:
Caused by: java.lang.IllegalArgumentException: At least one JPA metamodel must be present!
估计是跟多个数据源有关,改成如下这样就可以了
@SpringBootApplication
@EnableAutoConfiguration(exclude={
JpaRepositoriesAutoConfiguration.class//禁止springboot自动加载持久化bean
})
@ImportResource({"classpath:spring-servlet.xml"})
public class JzApplication { public static void main(String[] args) throws Exception {
ApplicationContext ctx = SpringApplication.run(JzApplication .class,args);
}
}
原因:可能在启动其他项目的时候,一些持久化的bean被加载了,导致这种情况
参考地址:http://blog.csdn.net/terry7/article/details/51996979
SpringBoot启动报:Caused by: java.lang.IllegalArgumentException: At least one JPA metamodel must be present!的更多相关文章
- Tomcat7.0启动报错:java.lang.illegalargumentexception:taglib definition not consisten with specification version
Tomcat7.0启动报错:java.lang.illegalargumentexception:taglib definition not consisten with specification ...
- spring-cloud-alibaba-sentinel和feign配合使用,启动报Caused by: java.lang.AbstractMethodError: com.alibaba.cloud.sentinel.feign.SentinelContractHolder.parseAndValidateMetadata(Ljava/lang/Class;)Ljava/util/List
背景 我在学习spring-cloud-alibaba技术栈期间,在学习服务熔断与限流的时候,服务启动发生了以下异常 #这是控制台最上面的 sun.misc.Unsafe.park(Native Me ...
- tomcat启动报错:java.lang.IllegalArgumentException: Document base D:\apache-tomcat-6.0.45\webapps\activiti-explorer does not exist or is not a readable directory
java.lang.IllegalArgumentException: Document base D:\apache-tomcat-6.0.45\webapps\erp does not exist ...
- springboot整合mybatis的时候报错Caused by: java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
今天闲来无事,学习springboot整合mybatis,在bilibili看视频学的,视频中在dao层的interface上面加上org.apache.ibatis.annotations.Mapp ...
- springcloud中config启动时候报错Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'config.info' in value "${config.info}"
-noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jm ...
- Caused by: java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required [ IDEA mybatis项目报错 ]
今天笔者用Springboot框架整合Mybatis做一个小小的项目: 代码写完,在运行项目时,IDEA给我报了3处错误: org.springframework.beans.factory.Unsa ...
- Spring.之.报错:Caused by: java.lang.IllegalArgumentException: No Spring Session store is configured: set the 'spring.session.store-type' property
Spring.之.报错 No Spring Session store is configured springboot在启动的时候报如下错误: Error starting ApplicationC ...
- 在docker安装tomcat的时候,报错:Caused by: java.lang.IllegalArgumentException: The AJP Connector is configured with secretRequired="true
初识docker,试着在docker中安装tomcat(安装的tomcat8.5),并且挂载到宿主机的相关目录下,结果启动的时候报错: 12-May-2020 01:14:34.061 SEVERE ...
- mybatis报错:Caused by: java.lang.IllegalArgumentException: Caches collection already contains value for com.crm.dao.PaperUserMapper
一.问题 eclipse启动时报下面的错误: Caused by: java.lang.IllegalArgumentException: Caches collection already cont ...
随机推荐
- appium问题解决
ppium 1.4.16 版本 测试安卓7.0 提示AppiumSettings.Unlock.AndroidInputManager 安装 修改 C:\Program Files (x86)\App ...
- Centos75 安装 postgresql11
切换到root账户, #安装yum 源 yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_6 ...
- Java判断字符串是否符合yyyyMMdd日期格式
Java判断字符串是否符合yyyyMMdd日期格式 代码: /** * 判断参数的格式是否为“yyyyMMdd”格式的合法日期字符串 * */ public static boolean isVali ...
- Java实现文件上传到服务器(FTP方式)
Java实现文件上传到服务器(FTP方式) 1,jar包:commons-net-3.3.jar 2,实现代码: //FTP传输到数据库服务器 private boolean uploadServer ...
- How to install tensorflow from source on ubuntu 18.04 64bit
1,install dependencies sudo apt-get install openjdk-8-jdk git python-dev python3-dev python-numpy py ...
- git status出现 fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git 提示说没有.git这样一个目录,解决办法如下: git ini ...
- Codeforces Round #408 (Div. 2) C. Bank Hacking
http://codeforces.com/contest/796/problem/C Although Inzane successfully found his beloved bone, Zan ...
- 谷歌开发者工具(F12)的使用小坑
python模拟登陆知乎,用开发者工具跟踪浏览器与服务器的交互,需要知道用户名,密码的字段名,可在文件email中看到:需要注意的是一定要 勾选 preserve log ,否则登陆之前的交互不会显示 ...
- 用训练好的caffemodel来进行分类
caffe程序自带有一张小猫图片,存放路径为caffe根目录下的 examples/images/cat.jpg, 如果我们想用一个训练好的caffemodel来对这张图片进行分类,那该怎么办呢? 如 ...
- vue 脚手架 (三,配置文件config, build目录)
本文以转移至本人的个人博客,请多多关注! 本文以转移至本人的个人博客,请多多关注! 本文以转移至本人的个人博客,请多多关注! 本文以转移至本人的个人博客,请多多关注! 上篇文章咱们介绍了vue web ...