小编Mar*_*Pop的帖子

需要一个类型为“org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder”的bean,但无法找到

我有一个 Spring Boot 2.4.0 应用程序,它连接到 2 个不同的数据源。我不断收到此错误。我在互联网上寻找解决方案。我发现我只需要使用@Primary 指定我的一个bean,事实上我也这样做了(所以这不是我的情况)。我将在下面发布错误和类。谢谢你:

错误:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.> 
<Jun 14, 2021 11:07:01 AM EEST> <Notice> <Stdout> <BEA-000000> <2021-06-14 11:07:01.740 ERROR 7845 --- [ (self-tuning)'] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of method entityManagerFactory in demo.Db1Config required a bean of type 'org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder' that could not be found.


Action:

Consider defining a bean of type 'org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder' in your configuration.> 
<Jun 14, 2021 …
Run Code Online (Sandbox Code Playgroud)

java spring hibernate-entitymanager spring-boot

9
推荐指数
1
解决办法
2万
查看次数

由于缺少 ServletWebServerFactory bean,无法启动 ServletWebServerApplicationContext。错误仍然存​​在

我正在尝试在 Eclipse Oxygen 上运行 Spring Boot 应用程序,但出现此错误。我搜索了它,其他解决方案没有帮助。这是一个简单的 spring initlizr 项目,它实际上什么都不做,但我无法运行它!如果之前有人遇到过这种情况,请告诉我如何解决它。谢谢

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

2018-04-12 09:00:15.094  INFO 10652 --- …
Run Code Online (Sandbox Code Playgroud)

spring spring-mvc maven

5
推荐指数
0
解决办法
3913
查看次数