Skip to content

Commit

Permalink
Revert "downgrade spring-boot version in order to make it java 11 com…
Browse files Browse the repository at this point in the history
…patible"

This reverts commit f2b546d.
  • Loading branch information
mariofusco committed Nov 27, 2023
1 parent 54e191f commit 6c14f1e
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion kogito-build/kogito-dependencies-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<!-- this version property is used in plugins but also in dependencies too -->
<version.io.quarkus>3.5.2</version.io.quarkus>
<version.io.quarkus.quarkus-test>${version.io.quarkus}</version.io.quarkus.quarkus-test>
<version.org.springframework.boot>2.6.6</version.org.springframework.boot>
<version.org.springframework.boot>3.0.5</version.org.springframework.boot>
<version.org.apache.kafka>3.5.1</version.org.apache.kafka>

<!-- dependencies versions -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
*/
package org.kie.kogito.eventdriven.decision;

import jakarta.annotation.PostConstruct;
import org.kie.kogito.config.ConfigBean;
import org.kie.kogito.decision.DecisionModels;
import org.kie.kogito.event.EventEmitter;
import org.kie.kogito.event.EventReceiver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import jakarta.annotation.PostConstruct;

@Component
public class SpringBootEventDrivenDecisionController extends EventDrivenDecisionController {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
*/
package org.kie.kogito.events.mongodb;

import jakarta.annotation.PostConstruct;
import org.kie.kogito.mongodb.transaction.AbstractTransactionManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.mongodb.client.MongoClient;

import jakarta.annotation.PostConstruct;

@Component
public class SpringbootMongoDBEventPublisher extends MongoDBEventPublisher {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
*/
package org.kie.kogito.eventdriven.predictions;

import jakarta.annotation.PostConstruct;
import org.kie.kogito.config.ConfigBean;
import org.kie.kogito.event.EventEmitter;
import org.kie.kogito.event.EventReceiver;
import org.kie.kogito.prediction.PredictionModels;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import jakarta.annotation.PostConstruct;

@Component
public class SpringBootEventDrivenPredictionsController extends EventDrivenPredictionsController {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatusCode;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
Expand Down Expand Up @@ -85,7 +86,7 @@ public String scheduleProcessInstanceJob(ProcessInstanceJobDescription descripti
ResponseEntity<String> result = restTemplate.postForEntity(getJobsServiceUri(),
request,
String.class);
if (result.getStatusCode().ordinal() == 200) {
if (result.getStatusCode().isSameCodeAs(HttpStatusCode.valueOf(200))) {
LOGGER.debug("Creating of the job {} done with status code {} ", job, result.getStatusCode());
}
return job.getId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package org.kie.kogito.addon.cloudevents.spring;

import jakarta.annotation.PostConstruct;
import org.kie.kogito.event.cloudevents.extension.KogitoExtension;
import org.kie.kogito.event.cloudevents.extension.KogitoPredictionsExtension;
import org.kie.kogito.event.cloudevents.extension.KogitoProcessExtension;
Expand All @@ -31,8 +32,6 @@

import io.cloudevents.jackson.JsonFormat;

import jakarta.annotation.PostConstruct;

/**
* The goal of this bean is to register the Kogito CloudEvent extension
* that allows the system to correctly parse Kogito extension attributes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public CompletionStage<Void> emit(DataEvent<?> event) {
env.getProperty("kogito.addon.cloudevents.kafka." + KogitoEventStreams.OUTGOING + "." + event.getType(),
defaultTopicName),
configBean.useCloudEvents() ? ceMarshaller.marshall(event.asCloudEvent(ceMarshaller.cloudEventDataFactory())) : marshaller.marshall(event.getData()))
.completable()
.thenApply(r -> null);
} catch (IOException e) {
throw new UncheckedIOException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.concurrent.ExecutionException;
import java.util.function.Function;

import jakarta.annotation.PostConstruct;
import org.kie.kogito.config.ConfigBean;
import org.kie.kogito.event.CloudEventUnmarshallerFactory;
import org.kie.kogito.event.DataEvent;
Expand All @@ -42,8 +43,6 @@
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;

import jakarta.annotation.PostConstruct;

@Component
public class SpringKafkaCloudEventReceiver implements EventReceiver {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/
package org.kie.kogito.monitoring.core.springboot;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import org.kie.kogito.monitoring.core.common.system.interceptor.MetricsInterceptor;
import org.springframework.lang.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import org.junit.jupiter.api.Test;
import org.kie.kogito.monitoring.core.common.system.interceptor.MetricsInterceptor;
Expand Down

0 comments on commit 6c14f1e

Please sign in to comment.