为了账号安全,请及时绑定邮箱和手机立即绑定

springboot

springboot

我爱马宁 2017-09-25 15:19:04
  .   ____          _            __ _ _ /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/  ___)| |_)| | | | | || (_| |  ) ) ) )  '  |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot ::        (v1.5.6.RELEASE)2017-09-25 15:14:17.342  INFO 1579 --- [           main] c.e.demo.SpringbootDemoApplication       : Starting SpringbootDemoApplication on gaoxindeMacBook-Pro.local with PID 1579 (/Users/gaoxin/java/workspace/springbootDemo/target/classes started by gaoxin in /Users/gaoxin/java/workspace/springbootDemo)2017-09-25 15:14:17.346  INFO 1579 --- [           main] c.e.demo.SpringbootDemoApplication       : No active profile set, falling back to default profiles: default2017-09-25 15:14:17.386  INFO 1579 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@341814d3: startup date [Mon Sep 25 15:14:17 CST 2017]; root of context hierarchy2017-09-25 15:14:18.449  INFO 1579 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8083 (http)2017-09-25 15:14:18.461  INFO 1579 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]2017-09-25 15:14:18.461  INFO 1579 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.162017-09-25 15:14:18.543  INFO 1579 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/first]  : Initializing Spring embedded WebApplicationContext2017-09-25 15:14:18.543  INFO 1579 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1159 ms2017-09-25 15:14:18.670  INFO 1579 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]2017-09-25 15:14:18.674  INFO 1579 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]2017-09-25 15:14:18.674  INFO 1579 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]2017-09-25 15:14:18.674  INFO 1579 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]2017-09-25 15:14:18.674  INFO 1579 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]2017-09-25 15:15:48.801  WARN 1579 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcConversionService' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.FormattingConversionService]: Factory method 'mvcConversionService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testRepositery': Cannot create inner bean '(inner bean)#6981f8f3' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#6981f8f3': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' available2017-09-25 15:16:01.660  INFO 1579 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]2017-09-25 15:16:27.601  INFO 1579 --- [           main] utoConfigurationReportLoggingInitializer : Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.2017-09-25 15:16:27.653 ERROR 1579 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : ***************************APPLICATION FAILED TO START***************************Description:Method mvcConversionService in org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport required a bean named 'entityManagerFactory' that could not be found.Action:Consider defining a bean named 'entityManagerFactory' in your configuration.
查看完整描述

4 回答

?
慕移动4708697

TA贡献45条经验 获得超22个赞

entityManagerFactory这个没找到,应该加个@Bean的注解在这个对象上面

查看完整回答
反对 回复 2018-06-04
?
日行跬步

TA贡献2条经验 获得超0个赞

怎么解决??

查看完整回答
反对 回复 2018-06-04
?
日行跬步

TA贡献2条经验 获得超0个赞

我也报这个错  这么解决的

查看完整回答
反对 回复 2018-06-04
?
褪去浮尘

TA贡献10条经验 获得超0个赞

没有配置实体管理工厂,

查看完整回答
反对 回复 2017-09-26
  • 4 回答
  • 0 关注
  • 3152 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信