数据源配置:
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.PostProcessorRegistrationDelegateBeanPostProcessorChecker−Bean′org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration′oftype[org.springframework.transaction.annotation.ProxyTransactionManagementConfigurationEnhancerBySpringCGLIB22ef58f8]isnoteligibleforgettingprocessedbyallBeanPostProcessors(forexample:noteligibleforauto−proxying)2020−01−0911:54:11.747[main]INFOorg.xnio−XNIOversion3.3.8.Final2020−01−0911:54:11.761[main]INFOorg.xnio.nio−XNIONIOImplementationVersion3.3.8.Final2020−01−0911:54:11.790[main]WARNio.undertow.websockets.jsr−UT026009:XNIOworkerwasnotsetonWebSocketDeploymentInfo,thedefaultworkerwillbeused2020−01−0911:54:11.790[main]WARNio.undertow.websockets.jsr−UT026010:BufferpoolwasnotsetonWebSocketDeploymentInfo,thedefaultpoolwillbeused2020−01−0911:54:11.811[main]INFOio.undertow.servlet−InitializingSpringembeddedWebApplicationContext2020−01−0911:54:11.812[main]INFOorg.springframework.web.context.ContextLoader−RootWebApplicationContext:initializationcompletedin1359ms2020−01−0911:54:11.910[main]INFOo.s.boot.web.servlet.ServletRegistrationBean−ServletdispatcherServletmappedto[/]2020−01−0911:54:11.914[main]INFOo.s.boot.web.servlet.FilterRegistrationBean−Mappingfilter:′characterEncodingFilter′to:[/∗]2020−01−0911:54:11.914[main]INFOo.s.boot.web.servlet.FilterRegistrationBean−Mappingfilter:′hiddenHttpMethodFilter′to:[/∗]2020−01−0911:54:11.915[main]INFOo.s.boot.web.servlet.FilterRegistrationBean−Mappingfilter:′httpPutFormContentFilter′to:[/∗]2020−01−0911:54:11.915[main]INFOo.s.boot.web.servlet.FilterRegistrationBean−Mappingfilter:′requestContextFilter′to:[/∗]2020−01−0911:54:12.290[main]INFOo.s.web.servlet.handler.SimpleUrlHandlerMapping−MappedURLpath[/∗∗/favicon.ico]ontohandleroftype[classorg.springframework.web.servlet.resource.ResourceHttpRequestHandler]2020−01−0911:54:12.530[main]INFOo.s.w.s.m.m.a.RequestMappingHandlerAdapter−Lookingfor@ControllerAdvice:org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@2e6a5539:startupdate[ThuJan0911:54:10CST2020];rootofcontexthierarchy2020−01−0911:54:12.647[main]INFOo.s.w.s.m.m.a.RequestMappingHandlerMapping−Mapped"[/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)2020−01−0911:54:12.648[main]INFOo.s.w.s.m.m.a.RequestMappingHandlerMapping−Mapped"[/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)2020−01−0911:54:12.675[main]INFOo.s.web.servlet.handler.SimpleUrlHandlerMapping−MappedURLpath[/webjars/∗∗]ontohandleroftype[classorg.springframework.web.servlet.resource.ResourceHttpRequestHandler]2020−01−0911:54:12.675[main]INFOo.s.web.servlet.handler.SimpleUrlHandlerMapping−MappedURLpath[/∗∗]ontohandleroftype[classorg.springframework.web.servlet.resource.ResourceHttpRequestHandler]2020−01−0911:54:12.747[main]INFOc.a.d.s.b.a.DruidDataSourceAutoConfigure−InitDruidDataSource2020−01−0911:54:12.785[main]WARNo.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext−Exceptionencounteredduringcontextinitialization−cancellingrefreshattempt:org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname′dataSource′definedinclasspathresource[com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]:Invocationofinitmethodfailed;nestedexceptionisorg.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
解决方法:
改为:
启动成功!