赞
踩
查看springboot的网站得到
- <parent>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-parent</artifactId>
- <version>2.0.1.RELEASE</version>
- </parent>
版本是 2.0.1.RELEASE
再看mybaitis的
发现mybatis的版本使用 1.3.1的介绍
然后按照这个配置进行:
java.lang.NoClassDefFoundError: org/springframework/dao/support/DaoSupport
版本不对啦
调整springboot的版本 为 1.5.8.RELEASE
1.5.8.RELEASE<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<!--<version>2.0.1.RELEASE</version> -->
<version>1.5.8.RELEASE</version>
</parent>
再次启动的时候,没有问题的
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.8.RELEASE)
2018-04-15 15:59:47.392 INFO 11612 --- [ main] miaosha.MainApp : Starting MainApp on DESKTOP-PKAPFDI with PID 11612 (D:\app\eclipsework\miaosha1\target\classes started by kaifeng1 in D:\app\eclipsework\miaosha1)
2018-04-15 15:59:47.397 INFO 11612 --- [ main] miaosha.MainApp : No active profile set, falling back to default profiles: default
2018-04-15 15:59:48.273 INFO 11612 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@5e25a92e: startup date [Sun Apr 15 15:59:48 CST 2018]; root of context hierarchy
2018-04-15 15:59:50.902 INFO 11612 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2018-04-15 15:59:50.929 INFO 11612 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2018-04-15 15:59:50.930 INFO 11612 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.23
2018-04-15 15:59:51.108 INFO 11612 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2018-04-15 15:59:51.108 INFO 11612 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2841 ms
2018-04-15 15:59:51.375 INFO 11612 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2018-04-15 15:59:51.383 INFO 11612 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-04-15 15:59:51.384 INFO 11612 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-04-15 15:59:51.384 INFO 11612 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-04-15 15:59:51.384 INFO 11612 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2018-04-15 15:59:52.439 INFO 11612 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@5e25a92e: startup date [Sun Apr 15 15:59:48 CST 2018]; root of context hierarchy
2018-04-15 15:59:52.549 INFO 11612 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sample/hello]}" onto miaosha.result.Result<java.lang.String> miaosha.controller.SampleController.hello()
2018-04-15 15:59:52.551 INFO 11612 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/sample/thymeleaf]}" onto public java.lang.String miaosha.controller.SampleController.toHelloHtml(org.springframework.ui.Model)
2018-04-15 15:59:52.554 INFO 11612 --- [ main] 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.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-04-15 15:59:52.555 INFO 11612 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-04-15 15:59:52.601 INFO 11612 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-15 15:59:52.602 INFO 11612 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-15 15:59:52.670 INFO 11612 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-15 15:59:53.789 INFO 11612 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-04-15 15:59:53.792 INFO 11612 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'dataSource' has been autodetected for JMX exposure
2018-04-15 15:59:53.799 INFO 11612 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'dataSource': registering with JMX server as MBean [com.alibaba.druid.pool:name=dataSource,type=DruidDataSource]
2018-04-15 15:59:53.899 INFO 11612 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2018-04-15 15:59:53.911 INFO 11612 --- [ main] miaosha.MainApp : Started MainApp in 7.066 seconds (JVM running for 7.678)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。