Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hengyunabc/spring-boot-utils
Spring boot 1 and spring boot 2 compatible utils.
https://github.com/hengyunabc/spring-boot-utils
spring-boot spring-boot-2
Last synced: 19 days ago
JSON representation
Spring boot 1 and spring boot 2 compatible utils.
- Host: GitHub
- URL: https://github.com/hengyunabc/spring-boot-utils
- Owner: hengyunabc
- License: mit
- Created: 2018-06-22T03:47:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-21T16:12:56.000Z (over 6 years ago)
- Last Synced: 2024-04-16T07:34:50.347Z (7 months ago)
- Topics: spring-boot, spring-boot-2
- Language: Java
- Size: 53.7 KB
- Stars: 17
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Spring boot 1 and spring boot 2 compatible utils.
Search the latest version in the cnetral repository : [Search](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.github.hengyunabc%22%20AND%20a%3A%22spring-boot-utils%22)
```xml
io.github.hengyunabc
spring-boot-utils
$version```
## Conditional Annotation
* @ConditionalOnSpringBoot1
* @ConditionalOnSpringBoot2## BinderUtils
`org.springframework.boot.bind.RelaxedDataBinder` only exists in spring boot 1.
`org.springframework.boot.context.properties.bind.Binder` on exists in spring boot 2.
`BinderUtils` support both spring boot 1 and spring boot 2.
```java
TestConfig testConfig = BinderUtils.bind(environment, "ttt", TestConfig.class);
```