Spring Boot Error: Error creating bean with Name ' entitymanagerfactory ' defined in class path resource

Source: Internet
Author: User

Spring Boot writes a Web project that, when using SPRING-DATA-JPA, launches the following error:

Error starting ApplicationContext. To display the Auto-configuration report re-run your application with ' debug ' enabled.
2018-04-02 17:00:47.076 ERROR 4648---[main] o.s.boot.springapplication:application startup failed

Workaround: Add dependencies to both

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.0.3.Final</version>
</dependency>

In addition, we can see that in MainApplication, the following annotations are also available:

  @EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})

Startup does not make an error, but at this point, the automatic creation of table functionality is not implemented, it is recommended to use the first way.

Spring Boot Error: Error creating bean with Name ' entitymanagerfactory ' defined in class path resource

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.