springboot配置文件yml读取不到。

数据源配置springboot配置文件yml读取不到。
appenders present in context [logback] for logger [org.springframework.core.env.PropertySourcesPropertyResolver].
11:54:10,274 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Will scan for changes in [file:/D:/p2-spot/target/classes/logback.xml]
11:54:10,274 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeTask scanning period to 1 seconds
11:54:10,275 |-INFO in ch.qos.logback.classic.joran.action.ContextNameAction - Setting logger context name as [logback]
11:54:10,275 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
11:54:10,275 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
11:54:10,275 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
11:54:10,276 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
11:54:10,276 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
11:54:10,277 |-INFO in [email protected] - No compression will be used
11:54:10,277 |-INFO in [email protected] - Will use the pattern logback_test/log/.%d{yyyy-MM-dd}.log for the active file
11:54:10,278 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is ‘yyyy-MM-dd’ from file name pattern ‘logback_test/log/.%d{yyyy-MM-dd}.log’.
11:54:10,278 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
11:54:10,279 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Thu Jan 09 11:54:10 CST 2020
11:54:10,279 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
11:54:10,280 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: logback_test/log/.2020-01-09.log
11:54:10,280 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [null]
11:54:10,281 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.apache.ibatis] to TRACE
11:54:10,281 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [java.sql.Connection] to DEBUG
11:54:10,281 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [java.sal.Statement] to DEBUG
11:54:10,281 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [java.sql.PreparedStatement] to DEBUG
11:54:10,281 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
11:54:10,281 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
11:54:10,281 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT]
11:54:10,281 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
11:54:10,281 |-INFO in org.s[email protected]a4add54 - Registering current configuration as safe fallback point

. ____ _ __ _ _
/\ / __ _ () __ __ _ \ \ \
( ( )_
_ | '_ | '| | ’ / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
’ |
| .__|| ||| |__, | / / / /
=|_|======|/=////
:: Spring Boot :: (v2.0.3.RELEASE)

2020-01-09 11:54:10.389 [main] INFO cn.paohe.Application - Starting Application on DESKTOP-KLFM7T1 with PID 18328 (D:\p2-spot\target\classes started by user in D:\p2-spot)
2020-01-09 11:54:10.393 [main] INFO cn.paohe.Application - No active profile set, falling back to default profiles: default
2020-01-09 11:54:10.453 [main] INFO o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Refreshing org.springframework.boot.web.ser[email protected]2e6a5539: startup date [Thu Jan 09 11:54:10 CST 2020]; root of context hierarchy
2020-01-09 11:54:11.042 [main] WARN org.mybatis.spring.mapper.ClassPathMapperScanner - No MyBatis mapper was found in ‘[cn.paohe.spot.dao]’ package. Please check your configuration.
2020-01-09 11:54:11.128 [main] WARN org.mybatis.spring.mapper.ClassPathMapperScanner - No MyBatis mapper was found in ‘[cn.paohe]’ package. Please check your configuration.
2020-01-09 11:54:11.162 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode!
2020-01-09 11:54:11.512 [main] INFO o.s.c.s.PostProcessorRegistrationDelegateBeanPostProcessorCheckerBeanorg.springframework.transaction.annotation.ProxyTransactionManagementConfigurationoftype[org.springframework.transaction.annotation.ProxyTransactionManagementConfigurationBeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfigurationEnhancerBySpringCGLIBEnhancerBySpringCGLIB22ef58f8]isnoteligibleforgettingprocessedbyallBeanPostProcessors(forexample:noteligibleforautoproxying)2020010911:54:11.747[main]INFOorg.xnioXNIOversion3.3.8.Final2020010911:54:11.761[main]INFOorg.xnio.nioXNIONIOImplementationVersion3.3.8.Final2020010911:54:11.790[main]WARNio.undertow.websockets.jsrUT026009:XNIOworkerwasnotsetonWebSocketDeploymentInfo,thedefaultworkerwillbeused2020010911:54:11.790[main]WARNio.undertow.websockets.jsrUT026010:BufferpoolwasnotsetonWebSocketDeploymentInfo,thedefaultpoolwillbeused2020010911:54:11.811[main]INFOio.undertow.servletInitializingSpringembeddedWebApplicationContext2020010911:54:11.812[main]INFOorg.springframework.web.context.ContextLoaderRootWebApplicationContext:initializationcompletedin1359ms2020010911:54:11.910[main]INFOo.s.boot.web.servlet.ServletRegistrationBeanServletdispatcherServletmappedto[/]2020010911:54:11.914[main]INFOo.s.boot.web.servlet.FilterRegistrationBeanMappingfilter:characterEncodingFilterto:[/]2020010911:54:11.914[main]INFOo.s.boot.web.servlet.FilterRegistrationBeanMappingfilter:hiddenHttpMethodFilterto:[/]2020010911:54:11.915[main]INFOo.s.boot.web.servlet.FilterRegistrationBeanMappingfilter:httpPutFormContentFilterto:[/]2020010911:54:11.915[main]INFOo.s.boot.web.servlet.FilterRegistrationBeanMappingfilter:requestContextFilterto:[/]2020010911:54:12.290[main]INFOo.s.web.servlet.handler.SimpleUrlHandlerMappingMappedURLpath[//favicon.ico]ontohandleroftype[classorg.springframework.web.servlet.resource.ResourceHttpRequestHandler]2020010911:54:12.530[main]INFOo.s.w.s.m.m.a.RequestMappingHandlerAdapterLookingfor@ControllerAdvice:org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@2e6a5539:startupdate[ThuJan0911:54:10CST2020];rootofcontexthierarchy2020010911:54:12.647[main]INFOo.s.w.s.m.m.a.RequestMappingHandlerMappingMapped"[/error]"ontopublicorg.springframework.http.ResponseEntity<java.util.Map<java.lang.String,java.lang.Object>>org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)2020010911:54:12.648[main]INFOo.s.w.s.m.m.a.RequestMappingHandlerMappingMapped"[/error],produces=[text/html]"ontopublicorg.springframework.web.servlet.ModelAndVieworg.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)2020010911:54:12.675[main]INFOo.s.web.servlet.handler.SimpleUrlHandlerMappingMappedURLpath[/webjars/]ontohandleroftype[classorg.springframework.web.servlet.resource.ResourceHttpRequestHandler]2020010911:54:12.675[main]INFOo.s.web.servlet.handler.SimpleUrlHandlerMappingMappedURLpath[/]ontohandleroftype[classorg.springframework.web.servlet.resource.ResourceHttpRequestHandler]2020010911:54:12.747[main]INFOc.a.d.s.b.a.DruidDataSourceAutoConfigureInitDruidDataSource2020010911:54:12.785[main]WARNo.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContextExceptionencounteredduringcontextinitializationcancellingrefreshattempt:org.springframework.beans.factory.BeanCreationException:ErrorcreatingbeanwithnamedataSourcedefinedinclasspathresource[com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]:Invocationofinitmethodfailed;nestedexceptionisorg.springframework.boot.autoconfigure.jdbc.DataSourceProperties22ef58f8] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-01-09 11:54:11.747 [main] INFO org.xnio - XNIO version 3.3.8.Final 2020-01-09 11:54:11.761 [main] INFO org.xnio.nio - XNIO NIO Implementation Version 3.3.8.Final 2020-01-09 11:54:11.790 [main] WARN io.undertow.websockets.jsr - UT026009: XNIO worker was not set on WebSocketDeploymentInfo, the default worker will be used 2020-01-09 11:54:11.790 [main] WARN io.undertow.websockets.jsr - UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used 2020-01-09 11:54:11.811 [main] INFO io.undertow.servlet - Initializing Spring embedded WebApplicationContext 2020-01-09 11:54:11.812 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1359 ms 2020-01-09 11:54:11.910 [main] INFO o.s.boot.web.servlet.ServletRegistrationBean - Servlet dispatcherServlet mapped to [/] 2020-01-09 11:54:11.914 [main] INFO o.s.boot.web.servlet.FilterRegistrationBean - Mapping filter: 'characterEncodingFilter' to: [/*] 2020-01-09 11:54:11.914 [main] INFO o.s.boot.web.servlet.FilterRegistrationBean - Mapping filter: 'hiddenHttpMethodFilter' to: [/*] 2020-01-09 11:54:11.915 [main] INFO o.s.boot.web.servlet.FilterRegistrationBean - Mapping filter: 'httpPutFormContentFilter' to: [/*] 2020-01-09 11:54:11.915 [main] INFO o.s.boot.web.servlet.FilterRegistrationBean - Mapping filter: 'requestContextFilter' to: [/*] 2020-01-09 11:54:12.290 [main] INFO o.s.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2020-01-09 11:54:12.530 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerAdapter - Looking for @ControllerAdvice: org.springframework.boot.web.ser[email protected]2e6a5539: startup date [Thu Jan 09 11:54:10 CST 2020]; root of context hierarchy 2020-01-09 11:54:12.647 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest) 2020-01-09 11:54:12.648 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) 2020-01-09 11:54:12.675 [main] INFO o.s.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2020-01-09 11:54:12.675 [main] INFO o.s.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2020-01-09 11:54:12.747 [main] INFO c.a.d.s.b.a.DruidDataSourceAutoConfigure - Init DruidDataSource 2020-01-09 11:54:12.785 [main] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourcePropertiesDataSourceBeanCreationException: Failed to determine a suitable driver class
2020-01-09 11:54:12.785 [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Unregistering JMX-exposed beans on shutdown
2020-01-09 11:54:12.805 [main] INFO o.s.b.a.l.ConditionEvaluationReportLoggingListener -

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2020-01-09 11:54:12.807 [main] ERROR o.s.b.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).

Disconnected from the target VM, address: ‘127.0.0.1:61248’, transport: ‘socket’

Process finished with exit code 1

解决方法
springboot配置文件yml读取不到。
改为
springboot配置文件yml读取不到。
启动成功!