You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "nrknithin (via GitHub)" <gi...@apache.org> on 2026/05/08 10:47:36 UTC
[PR] [WIP] DO NOT MERGE!!!! - Springboot 4.0.x upgrade [incubator-kie-kogito-apps]
nrknithin opened a new pull request, #2331:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2331
Kie-Issue: https://github.com/apache/incubator-kie-issues/issues/2288
Related PRs
- Drools: https://github.com/apache/incubator-kie-drools/pull/6686
- Optaplanner: https://github.com/apache/incubator-kie-optaplanner/pull/3221
- Kogito Runtimes: https://github.com/apache/incubator-kie-kogito-runtimes/pull/4270
### Summary
Migrate kogito-apps' Spring Boot side from **Spring Boot 3.5.x → 4.0.5** (inherited via `kogito-build-parent`). Touches the four Spring Boot variants — Data Index, Jobs Service, Trusty/Explainability, Data Audit — and their integration tests. Quarkus modules absorb the Hibernate / graphql-java bumps via the shared kogito-dependencies-bom but otherwise unchanged.
### What changed
**Version bumps (`kogito-apps-build-parent/pom.xml`)**
- `version.org.hibernate` `7.1.14.Final` → `7.1.18.Final` (matches kogito-runtimes' kogito-dependencies-bom; held at 7.1.x because Quarkus 3.27.3's `quarkus-hibernate-orm` references `org.hibernate.internal.CoreLogging`, removed in 7.2.x)
- `version.com.graphql-java` `24.3` → `25.0` (SB 4.0.5's spring-graphql calls `ExecutionInput.cancel()`, added in 25.0; under 24.3 it throws `NoSuchMethodError`)
- `version.com.graphql-java-extended-scalars` kept at `24.0` (no 25.x release on Maven Central yet; binary-compatible with graphql-java 25 for the scalars used)
**SB 4 module-split adaptations**
- `EntityScan` import: `org.springframework.boot.autoconfigure.domain` → `org.springframework.boot.persistence.autoconfigure` (3 files: data-audit-jpa-springboot, data-index-storage-jpa-springboot, kogito-addons-springboot-embedded-jobs-jpa)
- `Health` / `HealthIndicator` imports: `org.springframework.boot.actuate.health` → `org.springframework.boot.health.contributor` (3 files: data-audit, data-index, embedded-jobs HealthIndicator classes)
- Added `spring-boot-health` to the three health-indicator addon poms (SPI relocated out of `spring-boot-actuator`)
- Added `spring-boot-kafka` to `integration-tests-data-index-service-springboot/pom.xml` (`KafkaAutoConfiguration` extracted from `spring-boot-autoconfigure` into the opt-in `spring-boot-kafka`; required for `KafkaEventPublisher` to autowire `KafkaTemplate`). TODO covers folding into upstream `kie-addons-springboot-events-process-kafka`.
**Jackson 2 transition shims (SB 4 autoconfigures Jackson 3 only)**
- `SpringbootAuditDataConfiguration.java`: `@Bean ObjectMapper` (Jackson 2) gated with `@ConditionalOnMissingBean`, plus `@Bean MappingJackson2HttpMessageConverter` (without it `@RequestBody com.fasterxml.jackson.databind.JsonNode` on `GraphQLAuditDataRouteMapping` returns HTTP 400)
- Test fixture `KogitoSpringBootApplication` in data-index-storage-jpa-springboot: `@Bean ObjectMapper` so `UserTaskInstanceEntityMapperIT` can inject it
Each shim is tagged with `// TODO Jackson 3 migration` matching the pattern used in kogito-runtimes' `GlobalObjectMapperSpringTemplate`.
### Why no Jackson 3 migration here
Same constraint as kogito-runtimes: `kogito-events-core`'s `JacksonEventDataUnmarshaller` exposes `com.fasterxml.jackson.databind.ObjectMapper` and is shared between the SB and Quarkus sides. One-side migration forces the other; out of scope until the planned `kogito-dependencies-bom` split (common/springboot/quarkus) lands.
Verified with full `mvn clean verify`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#2288] - Springboot 4.0.x upgrade [incubator-kie-kogito-apps]
Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio merged PR #2331:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2331
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#2288] - Springboot 4.0.x upgrade [incubator-kie-kogito-apps]
Posted by "yesamer (via GitHub)" <gi...@apache.org>.
yesamer commented on code in PR #2331:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2331#discussion_r3232831191
##########
data-audit/kogito-addons-data-audit-springboot/src/main/java/org/kie/kogito/app/audit/springboot/SpringbootAuditDataConfiguration.java:
##########
@@ -21,19 +21,37 @@
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
+import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan
public class SpringbootAuditDataConfiguration {
- // Hibernate 7 + Spring ORM 6.2 workaround: Hibernate 7's SessionFactory.getSchemaManager()
- // returns org.hibernate.relational.SchemaManager, conflicting with JPA 3.2's
- // EntityManagerFactory.getSchemaManager() returning jakarta.persistence.SchemaManager.
- // Force plain JPA interface to avoid JDK Proxy incompatible return type error.
+ // TODO Jackson 3 migration: drop this Jackson 2 @Bean when the data-audit addon moves to Jackson 3.
Review Comment:
@nrknithin https://github.com/apache/incubator-kie-kogito-runtimes/pull/4270#discussion_r3232751598
##########
data-index/data-index-springboot/data-index-storage-jpa-springboot/src/test/java/org/kie/kogito/index/jpa/springboot/KogitoSpringBootApplication.java:
##########
@@ -20,11 +20,21 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
@SpringBootApplication(scanBasePackages = { "org.kie.kogito.**" })
public class KogitoSpringBootApplication {
public static void main(String[] args) {
SpringApplication.run(KogitoSpringBootApplication.class, args);
}
+
+ // TODO Jackson 3 migration: drop this Jackson 2 @Bean when the data-index Spring side moves to Jackson 3.
+ @Bean
Review Comment:
@nrknithin Same
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#2288] - Springboot 4.0.x upgrade [incubator-kie-kogito-apps]
Posted by "nrknithin (via GitHub)" <gi...@apache.org>.
nrknithin commented on code in PR #2331:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2331#discussion_r3239512480
##########
data-audit/kogito-addons-data-audit-springboot/src/main/java/org/kie/kogito/app/audit/springboot/SpringbootAuditDataConfiguration.java:
##########
@@ -21,19 +21,37 @@
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
+import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan
public class SpringbootAuditDataConfiguration {
- // Hibernate 7 + Spring ORM 6.2 workaround: Hibernate 7's SessionFactory.getSchemaManager()
- // returns org.hibernate.relational.SchemaManager, conflicting with JPA 3.2's
- // EntityManagerFactory.getSchemaManager() returning jakarta.persistence.SchemaManager.
- // Force plain JPA interface to avoid JDK Proxy incompatible return type error.
+ // TODO Jackson 3 migration: drop this Jackson 2 @Bean when the data-audit addon moves to Jackson 3.
Review Comment:
@yesamer Done, link to the tracking issue [drools#6702](https://github.com/apache/incubator-kie-drools/issues/6702) added
##########
data-index/data-index-springboot/data-index-storage-jpa-springboot/src/test/java/org/kie/kogito/index/jpa/springboot/KogitoSpringBootApplication.java:
##########
@@ -20,11 +20,21 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
@SpringBootApplication(scanBasePackages = { "org.kie.kogito.**" })
public class KogitoSpringBootApplication {
public static void main(String[] args) {
SpringApplication.run(KogitoSpringBootApplication.class, args);
}
+
+ // TODO Jackson 3 migration: drop this Jackson 2 @Bean when the data-index Spring side moves to Jackson 3.
+ @Bean
Review Comment:
@yesamer Done, link to the tracking issue [drools#6702](https://github.com/apache/incubator-kie-drools/issues/6702) added
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org