Skip to content
This repository was archived by the owner on Jan 31, 2024. It is now read-only.

Commit 2faa4dd

Browse files
committed
fixes #11
1 parent 84fee65 commit 2faa4dd

File tree

5 files changed

+8
-17
lines changed

5 files changed

+8
-17
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<parent>
1515
<groupId>org.springframework.boot</groupId>
1616
<artifactId>spring-boot-starter-parent</artifactId>
17-
<version>1.5.4.RELEASE</version>
17+
<version>1.5.6.RELEASE</version>
1818
</parent>
1919

2020
<properties>

src/main/java/com/hantsylabs/restexample/springmvc/Application.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
11
package com.hantsylabs.restexample.springmvc;
22

3-
import org.springframework.boot.autoconfigure.SpringBootApplication;
43
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
55
import org.springframework.context.annotation.Bean;
66
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
7-
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
8-
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
97
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
108

119
@SpringBootApplication
1210
public class Application extends WebMvcConfigurerAdapter {
1311

14-
@Override
15-
public void addResourceHandlers(ResourceHandlerRegistry registry) {
16-
registry.addResourceHandler("/**").addResourceLocations("file:/static/");
17-
}
18-
19-
@Override
20-
public void addViewControllers(ViewControllerRegistry registry) {
21-
registry.addViewController("/").setViewName("redirect:/index.html");
22-
}
23-
2412
public static void main(String[] args) {
2513
SpringApplication.run(Application.class, args);
2614
}

src/main/resources-dev/application.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ spring:
3737

3838
messages:
3939
basename: messages
40-
40+
resources:
41+
static-locations: classpath:/static/, file:/static/
4142
logging:
4243
file: app.log
4344
level:

src/main/resources-prod/application.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ spring:
4444
check-template-location: false
4545
messages:
4646
basename: messages
47-
47+
resources:
48+
static-locations: classpath:/static/, file:/static/
4849
logging.level:
4950
org.springframework.web: DEBUG
5051
com.verygood.payments.processing.http: DEBUG

src/main/resources-staging/application.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ spring:
4141

4242
messages:
4343
basename: messages
44-
44+
resources:
45+
static-locations: classpath:/static/, file:/static/
4546
logging.level:
4647
org.springframework.web: INFO
4748
com.hantsylabs.restexample.springmvc: DEBUG

0 commit comments

Comments
 (0)