Ich habe mein Spring Boot Projekt als Single Maven Projekt getestet und alles hat gut funktioniert. Ich entschied mich, meine Anwendung in Submodule zu teilen. Repository, Service und das Spring-Boot-Web-Modul. Der Autowired hört auf zu arbeiten. Und der folgende Fehler aufgetreten:RestController benötigt eine Service Bean mit Spring Boot & Multi Modulen
20:12:08.052 [main] WARN o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userRestController': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.plendo.service.interfaces.UserService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
20:12:08.068 [main] WARN o.s.boot.SpringApplication - Error handling failed (Error creating bean with name 'delegatingApplicationListener' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available)
20:12:08.243 [main] ERROR o.s.b.d.LoggingFailureAnalysisReporter - ``
***************************
APPLICATION FAILED TO START
***************************
Description:
Field userService in org.plendo.ui.controller.UserRestController required a bean of type 'org.plendo.service.interfaces.UserService' that could not be found.
Das sind nicht genug Informationen. Haben Sie z.B. Ändern Sie Ihre Paketstruktur? Wie sehen Ihre Projektstruktur- und Konfigklassen aus? – dunni