【发布时间】:2023-03-16 19:34:01
【问题描述】:
我尝试在 spring mvc 中运行 spring boot 应用程序 通过在spring mvc pom中添加spring boot app依赖 并扫描 spring boot 包 但我面临以下问题
ERROR org.springframework.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name anonymousFavouriteController: Unsatisfied dependency expressed through field batchFileUploadService; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name batchFileUploadServiceImpl: Unsatisfied dependency expressed through field uploadedFilesRepo; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean found for dependency [.bup.repository.UploadedFilesRepo]: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
【问题讨论】:
-
能否请您粘贴 pom 和完整的堆栈跟踪。
-
@joemokenela 错误更新
-
4.3.3.RELEASE -
我不明白,如何在 spring mvc 内部运行 spring boot 应用程序。如果问题是关于在单个 Web 应用程序中运行多个 Spring 上下文,我们需要更多信息,而不是错误消息。
-
我有 spring mvc 应用程序和 spring boot 应用程序,我需要在 spring mvc 应用程序中使用 spring boot 应用程序,我在 spring mvc 应用程序中添加了 spring boot 应用程序依赖项并且我使用了它但是当我使用服务层时(spring boot app)在spring mcv中我遇到了上面的错误@30thh
标签: java spring-boot spring-mvc