JCICS in Spring Boot applications

You can use JCICS in your Spring Boot applications to call CICS services. JCICS is integrated by default for WARs.

Although you can resolve your Spring Boot dependencies against JCICS by using the com.ibm.cics.server artifact on Maven Central, a more consistent approach is to use the JCICS bill of materials (BOM). This ensures you resolve against consistent versions of a range of CICS artifacts as shown in the examples below.

Avoid binding the JCICS library into your application as this is provided by the CICS runtime.

If you are using Maven, you can achieve this by compiling against the JCICS library by using <scope>provided</scope>. Or, if you are using the CICS TS BOM, the <scope>import</scope> on the <dependency> element automatically defers the scope value to the CICS BOM. The CICS BOM applies the 'provided' scope, which ensures JCICS is only included at build time. It is not embedded in your application where it might potentially conflict with the version that is used by the CICS runtime. For example,
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.ibm.cics</groupId>
            <artifactId>com.ibm.cics.ts.bom</artifactId>
            <version>5.5-20190701171918-PH10453</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
If you are using Gradle, you can either use the compileOnly directive, for example: compileOnly("com.ibm.cics:com.ibm.cics.server:1.700.0-5.5-PH10453"), or you can use the CICS TS BOM by using the 'enforcedPlatform' directive. Doing so infers the JCICS library version from the BOM in a more consistent and compatible manner. For example,
compileOnly enforcedPlatform('com.ibm.cics:com.ibm.cics.ts.bom:5.5-20191121085445-PH14856')
compileOnly("com.ibm.cics:com.ibm.cics.server")
Note: Consult Maven Central for the latest version number for appropriate for your release of CICS.

For more information about building applications with Maven and Gradle, see Developing applications using Maven or Gradle.