Background
SpringBoot 启动不成功
报错信息
2022-09-23 14:09:31 [main] INFO org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener -
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2022-09-23 14:09:31 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter -
APPLICATION FAILED TO START
Description:
Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
Process finished with exit code 1
原因
Spring 没找着配置文件,
target里没有配置文件
解决
改成 yml -> yaml 后 target 里有了