-
Notifications
You must be signed in to change notification settings - Fork 41.3k
Closed
Description
I have a really simple Spring-Boot application and I wonder why my WebApplicationInitializer is not recognized by SpringServletContainerInitializer?
At application startup in console everythings looks fine, but there is no System.err-output from the Initializer. Also, if I set a breakpoint inside the onStartup method it is never reached.
Did I miss anything?
Thanks.
My classes:
package de.tbosch.web.springboot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan
@EnableAutoConfiguration
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
package de.tbosch.web.springboot;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import org.springframework.web.WebApplicationInitializer;
public class Initializer implements WebApplicationInitializer {
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
System.err.println("------------------------------------");
}
}
Details: https://github.com/dickerpulli/playground/tree/master/web/spring-boot
Metadata
Metadata
Assignees
Labels
No labels