Skip to content

Commit

Permalink
refactor: Migrate to Spring Boot 3.3 (#167)
Browse files Browse the repository at this point in the history
* refactor: Migrate to Spring Boot 3.3

Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_3?organizationId=RklOT1M%3D

Co-authored-by: Moderne <[email protected]>

* Removed override

---------

Co-authored-by: Moderne <[email protected]>
  • Loading branch information
DovOps and TeamModerne authored May 31, 2024
1 parent cb93af5 commit f2e02a1
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 35 deletions.
9 changes: 2 additions & 7 deletions account-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,15 @@

plugins {
id 'java'
id 'org.springframework.boot' version '3.2.5'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.springframework.boot' version '3.3.0'
id 'io.spring.dependency-management' version '1.1.5'
}

group = 'finos.traderx.account-service'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

dependencies {
constraints {
implementation('org.springframework:spring-web:6.1.5') {
because 'CVE-2024-22259'
}
}

implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
Expand Down
2 changes: 1 addition & 1 deletion account-service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ spring.data.jpa.show-sql=true
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

# To avoid "Request header is too large" when application is backed by oidc proxy.
server.max-http-header-size=1000000
server.max-http-request-header-size=1000000

people.service.url=${PEOPLE_SERVICE_URL:http://${PEOPLE_SERVICE_HOST:localhost}:18089}
3 changes: 3 additions & 0 deletions database/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ jar {
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
9 changes: 2 additions & 7 deletions position-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,15 @@

plugins {
id 'java'
id 'org.springframework.boot' version '3.2.5'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.springframework.boot' version '3.3.0'
id 'io.spring.dependency-management' version '1.1.5'
}

group = 'finos.traderx.position-service'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

dependencies {
constraints {
implementation('org.springframework:spring-web:6.1.5') {
because 'CVE-2024-22259'
}
}

implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
Expand Down
2 changes: 1 addition & 1 deletion position-service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ spring.data.jpa.show-sql=true
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

# To avoid "Request header is too large" when application is backed by oidc proxy.
server.max-http-header-size=1000000
server.max-http-request-header-size=1000000
11 changes: 3 additions & 8 deletions trade-processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,16 @@

plugins {
id 'java'
id 'org.springframework.boot' version '3.2.5'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.springframework.boot' version '3.3.0'
id 'io.spring.dependency-management' version '1.1.5'
}

group = 'finos.traderx.position-service'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

dependencies {
constraints {
implementation('org.springframework:spring-web:6.1.5') {
because 'CVE-2024-22259'
}
}


implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.h2database:h2:2.2.224'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void publish(T message) throws PubSubException {
@Override
public void publish(String topic, T message) throws PubSubException {
if (!isConnected()) {
throw new PubSubException(String.format("Cannot send %s on topic %s - not connected", message, topic));
throw new PubSubException("Cannot send %s on topic %s - not connected".formatted(message, topic));
}
try {
SocketIOEnvelope<T> envelope = new SocketIOEnvelope<T>(topic, message);
Expand Down
2 changes: 1 addition & 1 deletion trade-processor/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.Ph
trade.feed.address=${TRADE_FEED_ADDRESS:http://${TRADE_FEED_HOST:localhost}:18086}

# To avoid "Request header is too large" when application is backed by oidc proxy.
server.max-http-header-size=1000000
server.max-http-request-header-size=1000000


logging.level.org.hibernate.SQL=DEBUG
Expand Down
9 changes: 2 additions & 7 deletions trade-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

plugins {
id 'java'
id 'org.springframework.boot' version '3.2.5'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.springframework.boot' version '3.3.0'
id 'io.spring.dependency-management' version '1.1.5'
}

group = 'finos.traderx.trade-service'
Expand All @@ -20,11 +20,6 @@ configurations.all {
}

dependencies {
constraints {
implementation('org.springframework:spring-web:6.1.5') {
because 'CVE-2024-22259'
}
}

implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void publish(T message) throws PubSubException {
@Override
public void publish(String topic, T message) throws PubSubException {
if (!isConnected()) {
throw new PubSubException(String.format("Cannot send %s on topic %s - not connected", message, topic));
throw new PubSubException("Cannot send %s on topic %s - not connected".formatted(message, topic));
}
try {
SocketIOEnvelope<T> envelope = new SocketIOEnvelope<T>(topic, message);
Expand Down
2 changes: 1 addition & 1 deletion trade-service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ reference.data.service.url=${REFERENCE_DATA_SERVICE_URL:http://${REFERENCE_DATA_
trade.feed.address=${TRADE_FEED_ADDRESS:http://${TRADE_FEED_HOST:localhost}:18086}

# To avoid "Request header is too large" when application is backed by oidc proxy.
server.max-http-header-size=1000000
server.max-http-request-header-size=1000000

logging.level.root=info

0 comments on commit f2e02a1

Please sign in to comment.