SpringBoot War package deployment issue

I haven't updated my blog for a long time. Recently, the company uses springboot to deploy with a WAR package. The normal way of writing is:

@SpringBootApplication
public class Application extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(Application.class);
    }

}


After encapsulation, it cannot run, and a tomcat startup error that the class cannot be found is reported. After being trapped for 2 days, it is finally found that the declaration sources (Application.class) must be displayed ;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326444945&siteId=291194637