Skip to content

Commit 69cd5cf

Browse files
alessiostallamaibin
authored andcommitted
BAEL-1636 (eugenp#3825)
* BAEL-1636 file upload with Spring Boot (nothing changes in the code per se, just the dependencies) * BAEL-1636 removed bogus dependencies * Updated rest-assured version because 2.9.0 is no longer on Central
1 parent b508689 commit 69cd5cf

2 files changed

Lines changed: 44 additions & 31 deletions

File tree

‎spring-mvc-java/pom.xml‎

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,48 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.baeldung</groupId>
55
<artifactId>spring-mvc-java</artifactId>
66
<version>0.1-SNAPSHOT</version>
77
<name>spring-mvc-java</name>
88

99
<parent>
10+
<artifactId>parent-boot-5</artifactId>
1011
<groupId>com.baeldung</groupId>
11-
<artifactId>parent-modules</artifactId>
12-
<version>1.0.0-SNAPSHOT</version>
12+
<version>0.0.1-SNAPSHOT</version>
13+
<relativePath>../parent-boot-5</relativePath>
1314
</parent>
1415

1516
<dependencies>
16-
<!-- Spring -->
17+
<!-- Spring Boot Dependencies -->
1718
<dependency>
18-
<groupId>org.springframework</groupId>
19-
<artifactId>spring-web</artifactId>
20-
<version>${org.springframework.version}</version>
21-
<exclusions>
22-
<exclusion>
23-
<groupId>commons-logging</groupId>
24-
<artifactId>commons-logging</artifactId>
25-
</exclusion>
26-
</exclusions>
19+
<groupId>org.springframework.boot</groupId>
20+
<artifactId>spring-boot-starter-thymeleaf</artifactId>
2721
</dependency>
2822
<dependency>
29-
<groupId>org.springframework</groupId>
30-
<artifactId>spring-webmvc</artifactId>
31-
<version>${org.springframework.version}</version>
23+
<groupId>org.springframework.boot</groupId>
24+
<artifactId>spring-boot-starter-actuator</artifactId>
3225
</dependency>
3326
<dependency>
34-
<groupId>org.springframework</groupId>
35-
<artifactId>spring-websocket</artifactId>
36-
<version>${org.springframework.version}</version>
27+
<groupId>org.springframework.boot</groupId>
28+
<artifactId>spring-boot-devtools</artifactId>
3729
</dependency>
3830
<dependency>
39-
<groupId>org.springframework</groupId>
40-
<artifactId>spring-messaging</artifactId>
41-
<version>${org.springframework.version}</version>
31+
<groupId>org.springframework.boot</groupId>
32+
<artifactId>spring-boot-test</artifactId>
33+
<scope>test</scope>
34+
</dependency>
35+
<dependency>
36+
<groupId>org.springframework.boot</groupId>
37+
<artifactId>spring-boot-starter-aop</artifactId>
38+
</dependency>
39+
<dependency>
40+
<groupId>org.springframework.boot</groupId>
41+
<artifactId>spring-boot-starter-web</artifactId>
42+
</dependency>
43+
<dependency>
44+
<groupId>org.springframework.boot</groupId>
45+
<artifactId>spring-boot-starter-websocket</artifactId>
4246
</dependency>
4347

4448
<!-- Jackson -->
@@ -63,11 +67,6 @@
6367
</dependency>
6468

6569
<!-- AOP -->
66-
<dependency>
67-
<groupId>org.springframework</groupId>
68-
<artifactId>spring-aop</artifactId>
69-
<version>${org.springframework.version}</version>
70-
</dependency>
7170
<dependency>
7271
<groupId>org.aspectj</groupId>
7372
<artifactId>aspectjrt</artifactId>
@@ -118,7 +117,6 @@
118117
<dependency>
119118
<groupId>org.springframework</groupId>
120119
<artifactId>spring-test</artifactId>
121-
<version>${org.springframework.version}</version>
122120
<scope>test</scope>
123121
</dependency>
124122

@@ -294,8 +292,6 @@
294292

295293
<properties>
296294
<!-- Spring -->
297-
<org.springframework.version>4.3.4.RELEASE</org.springframework.version>
298-
<org.springframework.security.version>4.2.0.RELEASE</org.springframework.security.version>
299295
<thymeleaf.version>2.1.5.RELEASE</thymeleaf.version>
300296
<jackson.version>2.9.4</jackson.version>
301297

@@ -317,7 +313,7 @@
317313
<!-- testing -->
318314
<httpcore.version>4.4.5</httpcore.version>
319315
<httpclient.version>4.5.2</httpclient.version>
320-
<rest-assured.version>2.9.0</rest-assured.version>
316+
<rest-assured.version>3.0.7</rest-assured.version>
321317
<net.sourceforge.htmlunit>2.23</net.sourceforge.htmlunit>
322318

323319
<!-- maven plugins -->
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.baeldung.app;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
5+
import org.springframework.boot.autoconfigure.SpringBootApplication;
6+
import org.springframework.boot.web.support.SpringBootServletInitializer;
7+
import org.springframework.context.annotation.ComponentScan;
8+
9+
@EnableAutoConfiguration
10+
@ComponentScan(value = {"com.baeldung.web.controller"}, resourcePattern = "**/FileUploadController.class")
11+
@SpringBootApplication
12+
public class Application extends SpringBootServletInitializer {
13+
14+
public static void main(final String[] args) {
15+
SpringApplication.run(Application.class, args);
16+
}
17+
}

0 commit comments

Comments
 (0)