ApplicationEventMulticaster not initialized with Spring HATEOAS
I am trying to use the EntityLinks concept from Spring HATEOAS.
EntityLinks is available for dependency injection by activating @EnableEntityLinks in Spring MVC config.
I do it just like this:
@Configuration
@EnableEntityLinks
@ComponentScan(basePackages = { "de.sample.test" })
public class WebMvcConfig extends WebMvcConfigurerAdapter {
...
}
Now if I run the application I get the following error:
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicast events via context: org.springframework.boot .context.embedded.AnnotationConfigEmbeddedWebApplicationContext @ 7869d479: start date [Thu Jun 29] 13:42:58 CEST 2017 context hierarchy root
Without the annotation, the application starts, but I don't have EntityLinks support.
Any suggestions? thanks in advance
+3
source to share