FINERACT-1724: Spring Boot upgrade to 3.x

This commit is contained in:
Arnold Galovics
2023-06-06 11:45:08 +02:00
committed by Arnold Gálovics
parent 94a552bbde
commit 84abf365c8
8 changed files with 28 additions and 25 deletions
+7 -7
View File
@@ -70,7 +70,7 @@ plugins {
id 'com.github.jk1.dependency-license-report' version '2.1' apply false id 'com.github.jk1.dependency-license-report' version '2.1' apply false
id 'org.openapi.generator' version '6.2.1' apply false id 'org.openapi.generator' version '6.2.1' apply false
id 'org.zeroturnaround.gradle.jrebel' version '1.1.12' apply false id 'org.zeroturnaround.gradle.jrebel' version '1.1.12' apply false
id 'org.springframework.boot' version '2.7.10' apply false id 'org.springframework.boot' version '3.1.0' apply false
id 'net.ltgt.errorprone' version '3.0.1' apply false id 'net.ltgt.errorprone' version '3.0.1' apply false
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.2.9' apply false id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.2.9' apply false
id 'com.gorylenko.gradle-git-properties' version '2.4.1' apply false id 'com.gorylenko.gradle-git-properties' version '2.4.1' apply false
@@ -95,7 +95,7 @@ description = '''\
Run as: Run as:
gradle clean bootRun''' gradle clean bootRun'''
ext['groovy.version'] = '3.0.10' ext['groovy.version'] = '4.0.6'
ext['swaggerFile'] = "$rootDir/fineract-provider/build/classes/java/main/static/fineract.yaml".toString() ext['swaggerFile'] = "$rootDir/fineract-provider/build/classes/java/main/static/fineract.yaml".toString()
allprojects { allprojects {
@@ -299,8 +299,8 @@ configure(project.fineractJavaProjects) {
targetCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17
/* http://stackoverflow.com/questions/19653311/jpa-repository-works-in-idea-and-production-but-not-in-gradle */ /* http://stackoverflow.com/questions/19653311/jpa-repository-works-in-idea-and-production-but-not-in-gradle */
sourceSets.main.output.resourcesDir = sourceSets.main.java.outputDir sourceSets.main.output.resourcesDir = sourceSets.main.java.classesDirectory
sourceSets.test.output.resourcesDir = sourceSets.test.java.outputDir sourceSets.test.output.resourcesDir = sourceSets.test.java.classesDirectory
configurations { configurations {
implementation.setCanBeResolved(true) implementation.setCanBeResolved(true)
@@ -412,13 +412,13 @@ configure(project.fineractJavaProjects) {
// https://www.eclemma.org/jacoco/ // https://www.eclemma.org/jacoco/
jacoco { jacoco {
toolVersion = jacocoVersion toolVersion = jacocoVersion
reportsDir = file("$buildDir/reports/jacoco") reportsDirectory = file("$buildDir/reports/jacoco")
} }
jacocoTestReport { jacocoTestReport {
reports { reports {
html.enabled=true html.required = true
xml.enabled=true xml.required = true
html.destination file("${buildDir}/code-coverage") html.destination file("${buildDir}/code-coverage")
} }
} }
@@ -22,8 +22,8 @@ apply plugin: 'io.spring.dependency-management'
// https://github.com/spring-gradle-plugins/dependency-management-plugin // https://github.com/spring-gradle-plugins/dependency-management-plugin
dependencyManagement { dependencyManagement {
imports { imports {
mavenBom 'org.springframework:spring-framework-bom:5.3.27' mavenBom 'org.springframework:spring-framework-bom:6.0.9'
mavenBom 'org.springframework.boot:spring-boot-dependencies:2.7.10' mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.0'
mavenBom 'org.jetbrains.kotlin:kotlin-bom:1.8.20' mavenBom 'org.jetbrains.kotlin:kotlin-bom:1.8.20'
mavenBom 'org.junit:junit-bom:5.9.2' mavenBom 'org.junit:junit-bom:5.9.2'
mavenBom 'com.fasterxml.jackson:jackson-bom:2.14.2' mavenBom 'com.fasterxml.jackson:jackson-bom:2.14.2'
@@ -219,7 +219,7 @@ dependencyManagement {
entry 'poi-ooxml-schemas' entry 'poi-ooxml-schemas'
} }
dependencySet(group: 'io.rest-assured', version: '4.5.1') { dependencySet(group: 'io.rest-assured', version: '5.3.0') {
entry 'rest-assured' entry 'rest-assured'
entry 'json-path' entry 'json-path'
entry 'xml-path' entry 'xml-path'
@@ -242,5 +242,8 @@ dependencyManagement {
dependency 'org.assertj:assertj-core:3.24.2' dependency 'org.assertj:assertj-core:3.24.2'
dependency 'org.apache.commons:commons-math3:3.6.1' dependency 'org.apache.commons:commons-math3:3.6.1'
dependency 'org.mockito:mockito-inline:5.2.0'
} }
} }
@@ -18,11 +18,11 @@
*/ */
package org.apache.fineract.infrastructure.core.jpa; package org.apache.fineract.infrastructure.core.jpa;
import jakarta.persistence.EntityManager;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.function.Supplier; import java.util.function.Supplier;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery; import javax.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.CriteriaQuery;
+1 -1
View File
@@ -117,5 +117,5 @@ task doc(type: Zip) {
} }
} }
} }
archiveName "${project.name}-${project.version}.zip" archiveFileName = "${project.name}-${project.version}.zip"
} }
+2 -2
View File
@@ -94,8 +94,8 @@ eclipse {
} }
/* http://stackoverflow.com/questions/19653311/jpa-repository-works-in-idea-and-production-but-not-in-gradle */ /* http://stackoverflow.com/questions/19653311/jpa-repository-works-in-idea-and-production-but-not-in-gradle */
sourceSets.main.output.resourcesDir = sourceSets.main.java.outputDir sourceSets.main.output.resourcesDir = sourceSets.main.java.classesDirectory
sourceSets.test.output.resourcesDir = sourceSets.test.java.outputDir sourceSets.test.output.resourcesDir = sourceSets.test.java.classesDirectory
if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) {
sourceSets { sourceSets {
+8 -8
View File
@@ -123,8 +123,8 @@ eclipse {
} }
/* http://stackoverflow.com/questions/19653311/jpa-repository-works-in-idea-and-production-but-not-in-gradle */ /* http://stackoverflow.com/questions/19653311/jpa-repository-works-in-idea-and-production-but-not-in-gradle */
sourceSets.main.output.resourcesDir = sourceSets.main.java.outputDir sourceSets.main.output.resourcesDir = sourceSets.main.java.classesDirectory
sourceSets.test.output.resourcesDir = sourceSets.test.java.outputDir sourceSets.test.output.resourcesDir = sourceSets.test.java.classesDirectory
if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) {
sourceSets { sourceSets {
@@ -154,10 +154,10 @@ dependencies {
driver 'mysql:mysql-connector-java:8.0.32' driver 'mysql:mysql-connector-java:8.0.32'
} }
URLClassLoader loader = GroovyObject.class.classLoader //URLClassLoader loader = GroovyObject.class.classLoader
configurations.driver.each {File file -> //configurations.driver.each {File file ->
loader.addURL(file.toURL()) // loader.addURL(file.toURL())
} //}
task createDB { task createDB {
description= "Creates the MariaDB Database. Needs database name to be passed (like: -PdbName=someDBname)" description= "Creates the MariaDB Database. Needs database name to be passed (like: -PdbName=someDBname)"
@@ -235,7 +235,7 @@ bootJar {
manifest { manifest {
attributes('Main-Class': 'org.springframework.boot.loader.PropertiesLauncher', 'Implementation-Title': 'Apache Fineract', 'Implementation-Version': project.version) attributes('Main-Class': 'org.springframework.boot.loader.PropertiesLauncher', 'Implementation-Title': 'Apache Fineract', 'Implementation-Version': project.version)
} }
classifier = '' archiveClassifier = ''
dependsOn resolve dependsOn resolve
} }
@@ -346,4 +346,4 @@ checkstyleTest.dependsOn resolve
rat.dependsOn prepareInputYaml rat.dependsOn prepareInputYaml
spotbugsTest.dependsOn resolve spotbugsTest.dependsOn resolve
compileTestJava.dependsOn ':fineract-client:processResources', ':fineract-avro-schemas:processResources' compileTestJava.dependsOn ':fineract-client:processResources', ':fineract-avro-schemas:processResources'
bootJarMainClassName.dependsOn resolve resolveMainClassName.dependsOn resolve
+2 -2
View File
@@ -44,7 +44,7 @@ war {
into "WEB-INF/" // no leading slash into "WEB-INF/" // no leading slash
} }
enabled = true enabled = true
classifier = '' archiveClassifier = ''
} }
dependencies { dependencies {
@@ -56,7 +56,7 @@ dependencies {
tasks.withType(Tar) { tasks.withType(Tar) {
compression Compression.GZIP compression Compression.GZIP
extension 'tar.gz' archiveExtension = 'tar.gz'
} }
distributions { distributions {
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists