SpringBootServletInitializer role

Creative Commons License Copyright: Attribution, allow others to create paper-based, and must distribute paper (based on the original license agreement with the same license Creative Commons )
  1. A look at the code of others, found that there is a startup class in addition to Application
package com.ruoyi;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

/**
 * web容器中进行部署
 * 
 * @author ruoyi
 */
public class RuoYiServletInitializer extends SpringBootServletInitializer
{
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
    {
        return application.sources(RuoYiApplication.class);
    }

}

  1. What it is social SpringBootServletInitializer view SpringBootServletInitializer notes that only in and build war files

Deploy it. If you like to run an embedded container, so there is no need to do so.

Here Insert Picture Description
3. The Internet is a lot, only to find a possible relatively clear https://blog.csdn.net/zq17865815296/article/details/79464403

Guess you like

Origin blog.csdn.net/LI_AINY/article/details/93772211