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

660 단어 springboot
spring boot 를 사용 하여 오래된 프로젝트 를 개조 합 니 다.
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);  
    }  
} 

좋은 웹페이지 즐겨찾기