“SpringbootservletInitializer Maven Dependency” Kode Jawaban

SpringbootservletInitializer Maven Dependency

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.1.RELEASE</version>
</parent>
Helpless Hedgehog

SpringbootservletInitializer Maven Dependency

...
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
// import org.springframework.boot.web.support.SpringBootServletInitializer;  // OBSOLETE
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@SpringBootApplication
public class SpringBootWebApplication extends SpringBootServletInitializer {

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

    public static void main(String[] args) throws Exception {
        SpringApplication.run(SpringBootWebApplication.class, args);
    }
...
Helpless Hedgehog

Jawaban yang mirip dengan “SpringbootservletInitializer Maven Dependency”

Pertanyaan yang mirip dengan “SpringbootservletInitializer Maven Dependency”

Lebih banyak jawaban terkait untuk “SpringbootservletInitializer Maven Dependency” di Java

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya