Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
kb:create_war [2016/08/08 07:37] – created yehuda | kb:create_war [2022/01/03 16:03] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Create WAR ====== | ====== Create WAR ====== | ||
+ | <code java alefbtApplication.java> | ||
+ | package com.alefbt.example; | ||
+ | import org.springframework.boot.SpringApplication; | ||
+ | import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
+ | import org.springframework.boot.builder.SpringApplicationBuilder; | ||
+ | import org.springframework.boot.context.web.SpringBootServletInitializer; | ||
+ | |||
+ | @SpringBootApplication | ||
+ | public class alefbtApplication extends SpringBootServletInitializer { | ||
+ | |||
+ | @Override | ||
+ | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | ||
+ | return application.sources(alefbtApplication.class); | ||
+ | } | ||
+ | |||
+ | public static void main(String[] args) throws Exception { | ||
+ | SpringApplication.run(alefbtApplication.class, | ||
+ | } | ||
+ | |||
+ | } | ||
+ | </ | ||
<code xml pom.xml> | <code xml pom.xml> | ||
- | <!-- Add to dependency --> | ||
< | < | ||
< | < | ||
- | < | + | < |
</ | </ | ||
< | < | ||
+ | < | ||
+ | |||
< | < | ||
< | < |