Skip to content

Commit

Permalink
added more comments on AppIntializer.java
Browse files Browse the repository at this point in the history
  • Loading branch information
hantsy committed Dec 30, 2017
1 parent 3f7c189 commit 6604b62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions war/src/main/java/com/example/demo/AppIntializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ protected void registerDispatcherHandler(ServletContext servletContext) {
*/
// in Spring 5.0.2, AbstractAnnotationConfigDispatcherHandlerInitializer is marked as deprecated.
// a new AbstractReactiveWebInitializer introduced for webflux based applications.
// But it seems AbstractReactiveWebInitializer does not refresh applicationContext, override createApplicationContext() to overcome this issue temporarily.
public class AppIntializer extends AbstractReactiveWebInitializer {

//new AnnotationConfigApplicationContext(Class<> ...) includes an extra refresh action.
@Override
protected ApplicationContext createApplicationContext() {
Class<?>[] configClasses = getConfigClasses();
Expand Down

0 comments on commit 6604b62

Please sign in to comment.