Error starting Tomcat context

The error is shown in the figure
Scenario: An error is reported in the production environment. You can see that jdbc is not connected at the end.
Question: 1. Jdbc jar package problem.

          2. The yml file is not specified when packaging

3. Other problems
Solution: 1. Check jdbc. If the jar package is in conflict, it is not a problem
if it can be started normally locally and there is a problem when publishing online . 2. If the files are not placed in the spring boot directory, for example, .java files are placed under src and .xml files are placed under resources .
The .yml file is under the resource. check carefully. If .xml is placed in the src directory. It needs to be specified when packaging. The details are as follows:

 

You can see that my xml is placed in xml. You need to specify the location of the .xml and .yml files for packaging

3. Other: please check whether the resource directory is a resource directory, as shown in the figure

If it is not, the ..yml configuration file is not found, and the jdbc connection cannot be reported.

Guess you like

Origin blog.csdn.net/qq_36090127/article/details/107628080