快捷导航

springboot

.   ____          _            __ _ _
/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: 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: default
2017-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 hierarchy
2017-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.16
2017-09-25 15:14:18.543  INFO 1579 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/first]  : Initializing Spring embedded WebApplicationContext
2017-09-25 15:14:18.543  INFO 1579 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1159 ms
2017-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' available
2017-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

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

使用道具 举报

怎么解决??
回复

使用道具 举报

我也报这个错 这么解决的
回复

使用道具 举报

没有配置实体管理工厂,
回复

使用道具 举报

可能感兴趣的问答

发新帖
  • 微信访问
  • 手机APP