Spring Boot Starter for security-yiban
Positioning · Capabilities · Dependencies · Enable · Configuration · Versions · Build · License
Current Version:
1.0.0-SNAPSHOT
JDK Baseline:8
Group ID:io.github.easy4j
Artifact ID:security-yiban-spring-boot-starter
License:Apache License 2.0
security-yiban-spring-boot-starter is a Spring Boot starter that integrates security-yiban for applications using security-yiban. It provides auto-configuration, property binding, and ready-to-use beans so that applications can consume security-yiban capabilities with minimal setup.
| Dimension | Description |
|---|---|
| Type | Spring Boot Starter |
| Consumers | Spring Boot applications using security-yiban |
| Core Capabilities | auto-configuration, property binding, ready-to-use beans for security-yiban |
| JDK | 8 |
| Source POM coordinates | io.github.easy4j:security-yiban-spring-boot-starter:1.0.0-SNAPSHOT |
| Config Prefix | spring.security.yiban |
| Capability | Status | Description |
|---|---|---|
| Auto-configuration | Declared in source | Registers security-yiban beans automatically |
| Property Binding | Declared in source | Binds spring.security.yiban.authc.* to SecurityYibanAuthcProperties |
YibanOAuthClient bean |
Declared in source | Auto-registered via SecurityYibanAutoConfiguration |
| Dependency | Minimum | Evidence |
|---|---|---|
| JDK | 8 |
pom.xml |
| Spring Boot | 2.3.12.RELEASE |
pom.xml parent |
| Maven | 3.0 |
Maven Enforcer |
For Boot 2.3 applications using the Boot parent, set spring-framework.version to 5.3.39 and
spring-security.version to 5.8.14 in the application POM. Security Biz is pinned to the Easy4J
snapshot build 2.7.x.20260630-20261029.080305-2, which is verified with Boot 2.3.12 and JDK 8
in this starter. Use the Easy4J Maven snapshot settings when building or consuming it.
The starter implements the OAuth contract from the official Yiban Java example (2.26.1103) with its existing Apache HttpClient. It uses the JVM trust store and hostname verification and disables redirects for API requests.
The starter auto-configures the following beans:
| Bean | Condition | Missing Behavior |
|---|---|---|
YibanOAuthClient |
classpath + property | not created |
SecurityContextLogoutHandler |
classpath + property | not created |
YibanMatchedAuthenticationEntryPoint |
classpath + property | not created |
YibanMatchedAuthenticationFailureHandler |
classpath + property | not created |
YibanAuthenticationProvider |
classpath + property | not created |
Boot 2.3 discovers these configurations through META-INF/spring.factories. The registered callback must route to /login/yiban by default, or to the configured spring.security.yiban.authc.login-url.
Use the starter with the Easy4J Security Biz dependency available from the snapshot repository. Provide a UserDetailsServiceAdapter bean to map verified Yiban credentials to a local account.
For an application that already loads the Yiban configuration:
spring:
security:
yiban:
enabled: true
authc:
app-key: ${YIBAN_APP_KEY}
app-secret: ${YIBAN_APP_SECRET}
callback: https://app.example.com/login/yibanspring.security.yiban
| Property | Type | Default | Required | Description | Sensitive |
|---|---|---|---|---|---|
spring.security.yiban.enabled |
boolean | false |
No | Enable the starter | No |
Authorization uses a one-time session state. Check the OAuth migration notes when updating existing Yiban integrations.
| Branch | JDK | Spring Boot | Component Version | Status |
|---|---|---|---|---|
2.3.x / 2.7.x |
8+ |
2.3.x / 2.7.x | 1.0.x |
Maintenance |
3.0.x ~ 3.5.x |
17 |
3.x | 2.0.x |
Maintenance |
4.1.x (76dfef6) |
21 |
4.1.2 | 4.1.x.20260630-SNAPSHOT |
Compilation blocked by missing SDK and authentication classes |
mvn -U clean verify| Symptom | Diagnosis | Resolution |
|---|---|---|
| Bean not created | Check auto-configuration report | Verify spring.security.yiban.enabled=true and classpath |
ClassNotFoundException |
Missing dependency | Add the required module |
| Version conflict | mvn dependency:tree |
Use BOM for version alignment |
- Fork the repository.
- Create a feature branch.
- Run
mvn clean verifybefore submitting. - Submit a pull request.
This project is licensed under the Apache License, Version 2.0.