File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed
src/main/java/ev/projects/webapp Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 7
7
<groupId >ev.projects</groupId >
8
8
<version >0.0.1-SNAPSHOT</version >
9
9
</parent >
10
+ <packaging >war</packaging >
10
11
<artifactId >WebApp</artifactId >
11
12
<version >0.0.1-SNAPSHOT</version >
12
13
<name >WebApp</name >
15
16
<java .version>11</java .version>
16
17
</properties >
17
18
<dependencies >
19
+ <dependency >
20
+ <groupId >org.springframework.boot</groupId >
21
+ <artifactId >spring-boot-starter-tomcat</artifactId >
22
+ <scope >provided</scope >
23
+ </dependency >
18
24
<dependency >
19
25
<groupId >org.apache.httpcomponents</groupId >
20
26
<artifactId >httpclient</artifactId >
60
66
</dependencies >
61
67
62
68
<build >
69
+ <finalName >DataStorageSimulator</finalName >
63
70
<plugins >
64
71
<plugin >
65
72
<groupId >org.springframework.boot</groupId >
66
73
<artifactId >spring-boot-maven-plugin</artifactId >
67
74
</plugin >
75
+ <plugin >
76
+ <artifactId >maven-war-plugin</artifactId >
77
+ <configuration >
78
+ <failOnMissingWebXml >false</failOnMissingWebXml >
79
+ </configuration >
80
+ </plugin >
68
81
</plugins >
69
82
</build >
70
83
Original file line number Diff line number Diff line change 2
2
3
3
import org .springframework .boot .SpringApplication ;
4
4
import org .springframework .boot .autoconfigure .SpringBootApplication ;
5
+ import org .springframework .boot .builder .SpringApplicationBuilder ;
6
+ import org .springframework .boot .web .servlet .support .SpringBootServletInitializer ;
5
7
import org .springframework .context .annotation .ComponentScan ;
8
+ import org .springframework .context .annotation .PropertySource ;
6
9
7
10
@ SpringBootApplication
8
- public class WebAppApplication {
11
+ public class WebAppApplication extends SpringBootServletInitializer {
9
12
13
+ @ Override
14
+ protected SpringApplicationBuilder configure (SpringApplicationBuilder application )
15
+ {
16
+ return application .sources (WebAppApplication .class );
17
+ }
10
18
public static void main (String [] args ) {
11
19
SpringApplication .run (WebAppApplication .class , args );
12
20
}
Original file line number Diff line number Diff line change 3
3
import org .springframework .boot .autoconfigure .domain .EntityScan ;
4
4
import org .springframework .context .annotation .ComponentScan ;
5
5
import org .springframework .context .annotation .Configuration ;
6
+ import org .springframework .context .annotation .PropertySource ;
6
7
import org .springframework .scheduling .annotation .EnableScheduling ;
7
8
8
9
@ Configuration
9
10
@ ComponentScan ({"ev.projects.services" , "ev.projects.webapp" })
10
11
@ EntityScan ({"ev.projects.models" })
11
12
@ EnableScheduling
13
+ @ PropertySource (value = { "classpath:application.properties" })
12
14
public class WebConfig {
13
15
}
You can’t perform that action at this time.
0 commit comments