Skip to content

Repository files navigation

opencli-spring-boot-starter

Spring Boot Starter for opencli

Maven CentralJavaLicense

简体中文 | English

Positioning · Capabilities · Dependency · Quick Start · Configuration · Versions · Build · License


Current Version3.5.x.20260630-SNAPSHOT
JDK Baseline17
Group IDio.github.easy4j
Artifact IDopencli-spring-boot-starter
License:Apache License 2.0

1. Positioning

opencli-spring-boot-starter is a Spring Boot starter that integrates opencli for applications using opencli. It provides auto-configuration, property binding, and ready-to-use beans so that applications can consume opencli capabilities with minimal setup.

DimensionDescription
TypeSpring Boot Starter
ConsumersSpring Boot applications using opencli
Core Capabilitiesauto-configuration, property binding, ready-to-use beans for opencli
JDK17
Coordinatesio.github.easy4j:opencli-spring-boot-starter:3.5.x.20260630-SNAPSHOT
Config Prefixopencli

2. Core Capabilities

CapabilityStatusDescription
Auto-configuration✅ StableRegisters opencli beans automatically
Property Binding✅ StableBinds opencli.* to OpenCliCenterWsProperties
OpenCliExecutor bean✅ StableAuto-registered via OpenCliAutoConfiguration

3. Requirements and Compatibility

DependencyMinimumEvidence
JDK17pom.xml
Spring Boot3.5.9pom.xml parent
Maven3.6+Maven Enforcer

4. Auto-configuration

The starter auto-configures the following beans:

BeanConditionMissing Behavior
OpenCliExecutorclasspath + propertynot created
OpenCliClientclasspath + propertynot created
OpenCliAvailabilityCheckerclasspath + propertynot created
OpenCliCliStartupCheckerclasspath + propertynot created
OpenCliWsReverseAgentClientclasspath + propertynot created
OpenCliMetaClientclasspath + propertynot created
OpenCliBrowserClientclasspath + propertynot created
CodexOpenCliClientclasspath + propertynot created
CursorOpenCliClientclasspath + propertynot created
ClaudeOpenCliClientclasspath + propertynot created
ChatgptOpenCliClientclasspath + propertynot created
GeminiOpenCliClientclasspath + propertynot created
JimengOpenCliClientclasspath + propertynot created
NpmOpenCliClientclasspath + propertynot created
ArxivOpenCliClientclasspath + propertynot created
WikipediaOpenCliClientclasspath + propertynot created
BinanceOpenCliClientclasspath + propertynot 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)

5. Dependency

<dependency>
<groupId>io.github.easy4j</groupId>
<artifactId>opencli-spring-boot-starter</artifactId>
<version>3.5.x.20260630-SNAPSHOT</version>
</dependency>

This starter depends on the following components (managed by ddd4j BOM):

<dependency>
<groupId>io.github.easy4j</groupId>
<artifactId>opencli-java-sdk</artifactId>
</dependency>

6. Quick Start

6.1 Add dependency

Add the dependency above to your pom.xml.

6.2 Configure

opencli:
enabled: true

6.3 Use the bean

@SpringBootApplicationpublicclassApplication {
publicstaticvoidmain(String[] args) {
SpringApplication.run(Application.class, args);
}
}

Then inject the auto-configured bean in your code:

@AutowiredprivateOpenCliExecutoropenCliExecutor;

7. Configuration Reference

7.1 Config Prefix

opencli

7.2 Configuration Items

PropertyTypeDefaultRequiredDescriptionSensitive
opencli.enabledbooleantrueNoEnable the starterNo

8. Version Lines and Compatibility

BranchJDKSpring BootComponent VersionStatus
2.3.x / 2.7.x8+2.3.x / 2.7.x1.0.xMaintenance
3.0.x ~ 3.5.x173.x2.0.xMaintenance
4.0.x / 4.1.x17+4.x3.0.xActive

9. Build and Test

mvn clean verify
mvn -pl opencli-spring-boot-starter -am test

10. Troubleshooting

SymptomDiagnosisResolution
Bean not createdCheck auto-configuration reportVerify opencli.enabled=true and classpath
ClassNotFoundExceptionMissing dependencyAdd the required module
Version conflictmvn dependency:treeUse BOM for version alignment

11. Contribution

  1. Fork the repository.
  2. Create a feature branch.
  3. Run mvn clean verify before submitting.
  4. Submit a pull request.

12. License

This project is licensed under the Apache License, Version 2.0.


About

Spring Boot starter for OpenCLI Java SDK

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages