Skip to content

Commit 1fae97a

Browse files
committed
#15, fix not properties
1 parent 31614cf commit 1fae97a

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ application, just like any single service provider node in Spring Cloud network.
6262
<dependency>
6363
<groupId>org.laxture</groupId>
6464
<artifactId>sbp-spring-boot-starter</artifactId>
65-
<version>0.1.4</version>
65+
<version>0.1.6</version>
6666
</dependency>
6767
```
6868
* Gradle
6969
```
7070
dependencies {
71-
implementation 'org.laxture:sbp-spring-boot-starter:0.1.4'
71+
implementation 'org.laxture:sbp-spring-boot-starter:0.1.6'
7272
}
7373
```
7474
* Latest master code is always available with version `-SNAPSHOT`
@@ -150,6 +150,7 @@ everything we need in the real project.
150150
### Documentation
151151
* [How it works](docs/how_it_works.md)
152152
* [Configuration](docs/configuration.md)
153+
* [Serve Static Content](docs/resource_handling.md)
153154
* [Persistence](docs/persistence.md)
154155
* [Security / AOP](docs/security_aop.md)
155156
* [Deployment](docs/deployment.md)

demo-app/src/main/resources/application.yml

-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
spring:
2-
mvc:
3-
throw-exception-if-no-handler-found: true
4-
static-path-pattern: /public/**
5-
resources:
6-
add-mappings: true
7-
cache:
8-
period: 3600
9-
http:
10-
encoding:
11-
force: true
122
datasource:
133
url: "jdbc:postgresql://localhost/sbp"
144
username: postgres

docs/how_it_works.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ although **sbp** is based on pf4j, but **sbp** rewrites classloading
66
behavior that will be quite different from original pf4j does.
77

88
### Get involved with Spring `ApplicationContext` initialization process.
9-
**sbp** extends `SpringApplication` from Spring Boot, which is
10-
`SpringBootstrap` to work with extend plugin loading capabilities.
9+
**sbp** extends `SpringApplication` to bootstrap a plugin `ApplicationContext`.
1110
![ApplicationContext](applicationContext.png?raw=true)
11+

docs/resource_handling.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
***sbp*** serve static resource inside of plugins by extending Spring Boot's
2+
`WebMvcAutoConfiguration` resource handling. The same
3+
[configuration](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-spring-mvc-static-content)
4+
as Spring Boot will work.
5+
6+
```
7+
spring:
8+
mvc:
9+
static-path-pattern: /public/**
10+
resources:
11+
add-mappings: true
12+
cache:
13+
period: 3600
14+
```

sbp-spring-boot-starter/src/main/java/org/springframework/boot/autoconfigure/web/servlet/PluginResourceHandlerRegistrationCustomizer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class PluginResourceHandlerRegistrationCustomizer implements
4141

4242
@Autowired
4343
@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
44-
private ResourceProperties resourceProperties;
44+
private ResourceProperties resourceProperties = new ResourceProperties();
4545

4646
@Autowired(required = false)
4747
@Qualifier("sbpResourceCache")

0 commit comments

Comments
 (0)