Spring Boot Starter for shiro-pac4j
Positioning · Capabilities · Dependency · Quick Start · Configuration · Versions · Build · License
Current Version:
2.0.1-SNAPSHOT
JDK Baseline:8
Group ID:io.github.easy4j
Artifact ID:shiro-pac4j-spring-boot-starter
License:Apache License 2.0
shiro-pac4j-spring-boot-starter is a Spring Boot starter that integrates shiro-pac4j for applications using shiro-pac4j. It provides auto-configuration, property binding, and ready-to-use beans so that applications can consume shiro-pac4j capabilities with minimal setup.
| Dimension | Description |
|---|---|
| Type | Spring Boot Starter |
| Consumers | Spring Boot applications using shiro-pac4j |
| Core Capabilities | auto-configuration, property binding, ready-to-use beans for shiro-pac4j |
| JDK | 8 |
| Coordinates | io.github.easy4j:shiro-pac4j-spring-boot-starter:2.0.1-SNAPSHOT |
| Config Prefix | shiro.pac4j |
| Capability | Status | Description |
|---|---|---|
| Auto-configuration | ✅ Stable | Registers shiro-pac4j beans automatically |
| Property Binding | ✅ Stable | Binds shiro.pac4j.* to ShiroPac4jProperties |
| Ready-to-use beans | ✅ Stable | Auto-registered via ShiroPac4jWebAutoConfiguration |
| Dependency | Minimum | Evidence |
|---|---|---|
| JDK | 8 |
pom.xml |
| Spring Boot | 2.6.15 |
pom.xml parent |
| Maven | 3.6+ |
Maven Enforcer |
The starter auto-configures the following beans:
| Bean | Condition | Missing Behavior |
|---|---|---|
Object |
classpath + property | not created |
Auto-configuration registration:
META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports(Spring Boot 2.7+ / 3.x / 4.x)META-INF/spring.factories(Spring Boot 2.x legacy)
<dependency>
<groupId>io.github.easy4j</groupId>
<artifactId>shiro-pac4j-spring-boot-starter</artifactId>
<version>2.0.1-SNAPSHOT</version>
</dependency>No additional easy4j component dependencies.
The main line uses Spring Boot 2.6.15 and Java 8. The application POM controls dependency management for its runtime tree. In an application that inherits spring-boot-starter-parent:2.6.15, merge these entries into the existing properties and dependencyManagement sections to select the versions tested with this starter.
<properties>
<spring-framework.version>5.3.39</spring-framework.version>
<jackson-bom.version>2.21.8</jackson-bom.version>
<snakeyaml.version>2.7</snakeyaml.version>
<commons-lang3.version>3.22.0</commons-lang3.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.11.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.7.2-jre</version>
</dependency>
<dependency>
<groupId>org.pac4j</groupId>
<artifactId>pac4j-core</artifactId>
<version>4.5.10</version>
</dependency>
<dependency>
<groupId>org.pac4j</groupId>
<artifactId>pac4j-config</artifactId>
<version>4.5.10</version>
</dependency>
<dependency>
<groupId>org.pac4j</groupId>
<artifactId>pac4j-http</artifactId>
<version>4.5.10</version>
</dependency>
</dependencies>
</dependencyManagement>Check the effective dependency tree from the application directory. Confirm that the runtime tree resolves Pac4j Core, Config, and HTTP to the same version. Continue scanning the application runtime for advisories that remain on this maintenance line.
mvn dependency:tree -Dscope=runtimeThe resolved pac4j-core:4.5.10 artifact is still reported by OSV under CVE-2026-40458 because the advisory database range includes versions below 5.7.10. The Pac4j maintainer's CSRF announcement lists the 5.x and 6.x lines. The published 4.5.10 JAR matches the Maven Central checksum, and its built-in CsrfAuthorizer compares the request token with the full session token using String.equals. This verification covers the built-in authorizer in that artifact. Applications using a different artifact or a custom authorizer have their own verification scope. The dependency advisory stays visible in scans. Pac4j announcement · 4.5.10 source · GitHub advisory
Add the dependency above to your pom.xml.
shiro.pac4j:
enabled: true@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}Then inject the auto-configured bean in your code:
@Autowired
private Object bean;shiro.pac4j
| Property | Type | Default | Required | Description | Sensitive |
|---|---|---|---|---|---|
shiro.pac4j.enabled |
boolean | true |
No | Enable the starter | No |
| 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.0.x / 4.1.x |
17+ |
4.x | 3.0.x |
Active |
mvn clean verify
mvn -pl shiro-pac4j-spring-boot-starter -am test| Symptom | Diagnosis | Resolution |
|---|---|---|
| Bean not created | Check auto-configuration report | Verify shiro.pac4j.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.