Skip to content

Commit

Permalink
Fix Spring Native for Spring Boot 3.3.3 (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinebhs authored Sep 19, 2024
1 parent f95e357 commit 64488cb
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 33 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ jobs:
-Djib.to.image=docker.io/gridsuite/directory-server:${GITHUB_REF_NAME#v}
-Djib.to.auth.username=gridsuiteci
-Djib.to.auth.password=${{ secrets.DOCKERHUB_TOKEN }}
# This has to be moved to the build-native-image job if the native image is used on the demo platform
- name: Broadcast update event
if: github.ref == 'refs/heads/main'
uses: gridsuite/broadcast-event@main
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
event-type: directory_server_updated
build-native-image:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -91,4 +84,11 @@ jobs:
-Ddocker.publishRegistry.username=gridsuiteci
-Ddocker.publishRegistry.password=${{ secrets.DOCKERHUB_TOKEN }}
-Dspring-boot.build-image.imageName=docker.io/gridsuite/directory-server-native:${GITHUB_REF_NAME#v}
-Dspring-boot.build-image.publish=true
-Dspring-boot.build-image.publish=true
- name: Broadcast update event
if: github.ref == 'refs/heads/main'
uses: gridsuite/broadcast-event@main
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
event-type: directory_server_updated
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<testcontainers.version>1.18.3</testcontainers.version>
<liquibase-hibernate-package>org.gridsuite.directory.server</liquibase-hibernate-package>
<to-string-verifier-version>1.4.8</to-string-verifier-version>
<native-buildtools.version>0.10.0</native-buildtools.version>
<native-buildtools.version>0.10.3</native-buildtools.version>
<db-util.version>1.0.5</db-util.version>
</properties>

Expand Down Expand Up @@ -251,6 +251,12 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
Expand Down
86 changes: 71 additions & 15 deletions src/main/resources/META-INF/native-image/reflect-config.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,73 @@
[
{
"name":"[Ljava.util.UUID;"
},
{
"name":"org.springframework.core.env.AbstractEnvironment",
"methods":[{"name":"getProperty","parameterTypes":["java.lang.String"]}]
},
{
"name":"co.elastic.clients.elasticsearch._types.mapping.TypeMapping",
"fields":[{"name":"_DESERIALIZER"}]
},
{
"name":"co.elastic.clients.elasticsearch.indices.IndexSettings",
"fields":[{"name":"_DESERIALIZER"}]
}
{
"name":"[Ljava.util.UUID;",
"condition": {
"typeReachable":"org.hibernate.loader.ast.internal.MultiIdEntityLoaderArrayParam"
}
},
{
"name":"org.springframework.core.env.AbstractEnvironment",
"condition": {
"typeReachable":"org.springframework.core.env.AbstractEnvironment"
},
"methods":[
{
"name":"getProperty",
"parameterTypes":[
"java.lang.String"
]}
]
},
{
"name": "liquibase.ui.LoggerUIService",
"condition": {
"typeReachable": "liquibase.ui.LoggerUIService"
},
"methods": [
{
"name": "<init>",
"parameterTypes": [
]
}
]
},
{
"name": "liquibase.database.LiquibaseTableNamesFactory",
"condition": {
"typeReachable": "liquibase.database.LiquibaseTableNamesFactory"
},
"methods": [
{
"name": "<init>",
"parameterTypes": [
]
}
]
},
{
"name": "liquibase.parser.SqlParserFactory",
"condition": {
"typeReachable": "liquibase.parser.SqlParserFactory"
},
"methods": [
{
"name": "<init>",
"parameterTypes": [
]
}
]
},
{
"name": "liquibase.report.ShowSummaryGeneratorFactory",
"condition": {
"typeReachable": "liquibase.report.ShowSummaryGeneratorFactory"
},
"methods": [
{
"name": "<init>",
"parameterTypes": [
]
}
]
}
]
3 changes: 3 additions & 0 deletions src/main/resources/META-INF/native-image/resource-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"includes": [
{
"pattern": "\\Qelasticsearch_settings.json\\E"
},
{
"pattern":"\\Qorg/gridsuite/directory/server/repository/DirectoryElementRepository$SubDirectoryCount.class\\E"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:pro="http://www.liquibase.org/xml/ns/pro" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-3.10.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.10.xsd" logicalFilePath="db/changelog/changesets/changelog_2021-10-19T14:07:51Z.xml">
<changeSet author="borsenbergerjac (generated)" id="1635407235821-1">
<!--
To remove when Liquibase version >= 4.23.0
createTable checksums are different between Spring Native and Spring + JVM in Liquibase 4.20.0.
Checksums generated by Spring + JVM and Spring Native are added to guarantee compatibility.
This is fixed in Liquibase 4.23.0 with checksum V9.
-->
<validCheckSum>8:920d752bb79d32085f4e88d66c54cf6e</validCheckSum> <!-- Spring Native checksum -->
<validCheckSum>8:f0e4f92192a4fa4482372ffa2a0f435b</validCheckSum> <!-- Spring + JVM checksum -->
<createTable tableName="element">
<column name="id" type="UUID">
<constraints nullable="false" primaryKey="true" primaryKeyName="elementPK"/>
Expand Down

0 comments on commit 64488cb

Please sign in to comment.