Spring Cloud Micro Service startup error (1)

Source: Internet
Author: User

This afternoon when I started Spring cloud microservices, I reported this error:

Error starting ApplicationContext. To display the Auto-configuration report re-run your application with ' debug ' enabled.
2018-07-03 20:17:10.295 ERROR 19024---[main] o.s.b.d.loggingfailureanalysisreporter:

***************************
Application FAILED to START
***************************

Description:

Cannot determine embedded database driver class for database type NONE

Action:

If you want a embedded database, put a supported one on the classpath. If you have the database settings to is loaded from a particular profiles you may need to active it (no profiles is currently Active).

Disconnected from the target VM, address: ' 127.0.0.1:55393 ', Transport: ' Socket '

Process finished with exit code 1

At first I thought the port was occupied. Decisive cmd and input netstat-aon, looking for half a day did not find the port occupied, and then looked on the internet a bit,

Transferred from: 78190703?locationnum=9&fps=1

Springboot Start Error: Cannot determine embedded database driver class for database type NONE

Springboot automatically injects data sources and configures JPA at startup

Workaround One: Add annotations to the Startup class: @SpringBootApplication (Exclude={datasourceautoconfiguration.class, Hibernatejpaautoconfiguration.class})Workaround Two: Configure the data source within the Application.properties file. The code is as follows:
Spring.datasource.url=jdbc:mysql://localhost:3306/testspring.datasource.username= Rootspring.datasource.password=123456spring.datasource.driver-class-name= com.mysql.jdbc.driverspring.datasource.max-idle=10spring.datasource.max-wait=10000spring.datasource.min-idle= 5spring.datasource.initial-size=5

I carefully examined, also added the annotation, tried, I, useless ah, life, is really not bedug,

Had to use the ultimate trick, copy my own code, delete the project, update the project from new SVN, import run, hey yo I go. Why is that still the problem? Is it my project configuration problem? No, my other projects are fine. Helpless, had to turn to the small bowl (a serious work of the Big Guy);

Spring Cloud Micro Service startup error (1)

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.