ApplicationEventMulticaster not initialized with Spring HATEOAS

Viewed 3565

I try to use the EntityLinks concept from Spring HATEOAS.

EntityLinks is available for dependency injection by activating @EnableEntityLinks in your Spring MVC configuration.

I do it just like that:

@Configuration
@EnableEntityLinks
@ComponentScan(basePackages = { "de.sample.test" })
public class WebMvcConfig extends WebMvcConfigurerAdapter {
       ...
}

Now if I start the application I get the following error:

java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7869d479: startup date [Thu Jun 29 13:42:58 CEST 2017]; root of context hierarchy

Without the annotation the application starts but I have no EntityLinks support.

Any suggestions? Thanks in advance

1 Answers
Related