Skip to content

Commit 14bdd8e

Browse files
authored
Merge pull request eugenp#4258 from dhruba619/master
BAEL-1627 Moved the code to new module spring-boot-mvc
2 parents 3672f5d + 6d1049a commit 14bdd8e

12 files changed

Lines changed: 109 additions & 5 deletions

File tree

‎pom.xml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
<module>spring-boot-admin</module>
147147
<module>spring-boot-ops</module>
148148
<module>spring-boot-security</module>
149+
<module>spring-boot-mvc</module>
149150
<module>spring-cloud-data-flow</module>
150151
<module>spring-cloud</module>
151152
<module>spring-core</module>

‎spring-boot-mvc/.gitignore‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
4+
### STS ###
5+
.apt_generated
6+
.classpath
7+
.factorypath
8+
.project
9+
.settings
10+
.springBeans
11+
.sts4-cache
12+
13+
### IntelliJ IDEA ###
14+
.idea
15+
*.iws
16+
*.iml
17+
*.ipr
18+
19+
### NetBeans ###
20+
/nbproject/private/
21+
/build/
22+
/nbbuild/
23+
/dist/
24+
/nbdist/
25+
/.nb-gradle/

‎spring-boot-mvc/pom.xml‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<groupId>com.baeldung</groupId>
7+
<artifactId>spring-boot-mvc</artifactId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
<packaging>jar</packaging>
10+
11+
<name>spring-boot-mvc</name>
12+
<description>Demo project for Spring Boot</description>
13+
14+
<parent>
15+
<groupId>org.springframework.boot</groupId>
16+
<artifactId>spring-boot-starter-parent</artifactId>
17+
<version>2.0.2.RELEASE</version>
18+
<relativePath/> <!-- lookup parent from repository -->
19+
</parent>
20+
21+
<properties>
22+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24+
<java.version>1.8</java.version>
25+
</properties>
26+
27+
<dependencies>
28+
<dependency>
29+
<groupId>org.springframework.boot</groupId>
30+
<artifactId>spring-boot-starter-web</artifactId>
31+
</dependency>
32+
33+
<dependency>
34+
<groupId>org.springframework.boot</groupId>
35+
<artifactId>spring-boot-starter-test</artifactId>
36+
<scope>test</scope>
37+
</dependency>
38+
</dependencies>
39+
40+
<build>
41+
<plugins>
42+
<plugin>
43+
<groupId>org.springframework.boot</groupId>
44+
<artifactId>spring-boot-maven-plugin</artifactId>
45+
</plugin>
46+
</plugins>
47+
</build>
48+
49+
50+
</project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.baeldung.springbootmvc;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
6+
7+
@SpringBootApplication
8+
public class SpringBootMvcApplication {
9+
10+
public static void main(String[] args) {
11+
SpringApplication.run(SpringBootMvcApplication.class, args);
12+
}
13+
}

spring-rest/src/main/java/org/baeldung/config/FaviconConfiguration.java renamed to spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/config/FaviconConfiguration.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.baeldung.config;
1+
package com.baeldung.springbootmvc.config;
22

33
import java.util.Arrays;
44
import java.util.Collections;
@@ -8,7 +8,6 @@
88
import org.springframework.context.annotation.Configuration;
99
import org.springframework.core.io.ClassPathResource;
1010
import org.springframework.core.io.Resource;
11-
import org.springframework.stereotype.Controller;
1211
import org.springframework.web.bind.annotation.RequestMapping;
1312
import org.springframework.web.bind.annotation.RequestMethod;
1413
import org.springframework.web.bind.annotation.ResponseBody;
@@ -28,7 +27,7 @@ public SimpleUrlHandlerMapping myFaviconHandlerMapping() {
2827
@Bean
2928
protected ResourceHttpRequestHandler faviconRequestHandler() {
3029
ResourceHttpRequestHandler requestHandler = new ResourceHttpRequestHandler();
31-
ClassPathResource classPathResource = new ClassPathResource("com/baeldung/produceimage/images");
30+
ClassPathResource classPathResource = new ClassPathResource("com/baeldung/images");
3231
List<Resource> locations = Arrays.asList(classPathResource);
3332
requestHandler.setLocations(locations);
3433
return requestHandler;

‎spring-boot-mvc/src/main/resources/application.properties‎

Whitespace-only changes.

spring-rest/src/main/resources/static/favicon.ico renamed to spring-boot-mvc/src/main/resources/com/baeldung/images/favicon.ico

File renamed without changes.
14.7 KB
Binary file not shown.
14.7 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Welcome to Baeldung

0 commit comments

Comments
 (0)