Skip to content

Commit 1b7667e

Browse files
chore: merge release-1.x into dev-1.x [skip ci]
2 parents 1cfceda + 3cb62a6 commit 1b7667e

14 files changed

Lines changed: 142 additions & 42 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Maven Build (Java 11+)
10+
11+
permissions:
12+
contents: read
13+
14+
on:
15+
push:
16+
branches: [ 'dev-1.x' ]
17+
pull_request:
18+
branches: [ 'dev-1.x' , 'release-1.x' ]
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
strategy:
24+
matrix:
25+
java: [ '11' , '17' , '21' , '25' ]
26+
maven-profile-spring-cloud: [ 'spring-cloud-hoxton' , 'spring-cloud-2020' , 'spring-cloud-2021' ]
27+
maven-hibernate: [ 'hibernate-5.6' , 'hibernate-5.5' , 'hibernate-5.4' , 'hibernate-5.3' ]
28+
29+
steps:
30+
- name: Checkout Source
31+
uses: actions/checkout@v5
32+
33+
- name: Setup Java ${{ matrix.java }}
34+
uses: actions/setup-java@v5
35+
with:
36+
distribution: 'temurin'
37+
java-version: ${{ matrix.java }}
38+
cache: maven
39+
40+
- name: Build with Maven
41+
run: mvn
42+
--batch-mode
43+
--update-snapshots
44+
--file pom.xml
45+
-Drevision=0.0.1-SNAPSHOT
46+
test
47+
--activate-profiles test,coverage,${{ matrix.maven-profile-spring-cloud }},${{ matrix.maven-hibernate }}
48+
49+
- name: Upload coverage reports to Codecov
50+
uses: codecov/codecov-action@v5
51+
with:
52+
token: ${{ secrets.CODECOV_TOKEN }}
53+
slug: microsphere-projects/microsphere-hibernate

.github/workflows/maven-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
java: [ '8', '11' , '17' , '21' , '25' ]
25+
java: [ '8' ]
2626
maven-profile-spring-cloud: [ 'spring-cloud-hoxton' , 'spring-cloud-2020' , 'spring-cloud-2021' ]
2727
maven-hibernate: [ 'hibernate-5.6' , 'hibernate-5.5' , 'hibernate-5.4' , 'hibernate-5.3' ,
2828
'hibernate-5.2' , 'hibernate-5.1' , 'hibernate-5.0' ]
@@ -45,7 +45,7 @@ jobs:
4545
--file pom.xml
4646
-Drevision=0.0.1-SNAPSHOT
4747
test
48-
--activate-profiles test,coverage,${{ matrix.maven-profile-spring-cloud }}
48+
--activate-profiles test,coverage,${{ matrix.maven-profile-spring-cloud }},${{ matrix.maven-hibernate }}
4949

5050
- name: Upload coverage reports to Codecov
5151
uses: codecov/codecov-action@v5

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ pom.xml:
4444

4545
| **Branches** | **Purpose** | **Latest Version** |
4646
|--------------|--------------------------------------------------|--------------------|
47-
| **main** | Compatible with Spring Cloud 2022.0.x - 2025.0.x | 0.2.1 |
48-
| **1.x** | Compatible with Spring Cloud Hoxton - 2021.0.x | 0.1.1 |
47+
| **main** | Compatible with Spring Cloud 2022.0.x - 2025.0.x | 0.2.2 |
48+
| **1.x** | Compatible with Spring Cloud Hoxton - 2021.0.x | 0.1.2 |
4949

5050
### Compatibility
5151

microsphere-hibernate-core/pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,20 @@
8484

8585
</dependencies>
8686

87+
<profiles>
88+
<profile>
89+
<id>java9+</id>
90+
<activation>
91+
<jdk>[9,)</jdk>
92+
</activation>
93+
<dependencies>
94+
<dependency>
95+
<groupId>javax.xml.bind</groupId>
96+
<artifactId>jaxb-api</artifactId>
97+
<optional>true</optional>
98+
</dependency>
99+
</dependencies>
100+
</profile>
101+
</profiles>
102+
87103
</project>

microsphere-hibernate-core/src/main/java/io/microsphere/hibernate/DelegatingInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public class DelegatingInterceptor implements Interceptor, DelegatingWrapper {
5959

6060
/**
6161
* Creates a new {@link DelegatingInterceptor} wrapping the given delegate.
62-
* If {@code delegate} is {@code null}, {@link org.hibernate.internal.EmptyInterceptor#INSTANCE} is used.
62+
* If {@code delegate} is {@code null}, {@link org.hibernate.EmptyInterceptor#INSTANCE} is used.
6363
*
6464
* @param delegate the {@link Interceptor} to delegate to, or {@code null} for the empty interceptor
6565
*/

microsphere-hibernate-core/src/main/java/io/microsphere/hibernate/entity/CompositeEntityCallback.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public CompositeEntityCallback(List<EntityCallback> callbacks) {
6161
}
6262

6363
@Override
64-
public void onLoad(Object id, String entityClassName, Object entity, LockMode lockMode, boolean isAssociationFetch, Object result, Boolean readOnly, LoadEventListener.LoadType loadType) {
65-
forEach(this.callbacks, callback -> callback.onLoad(id, entityClassName, entity, lockMode, isAssociationFetch, result, readOnly, loadType));
64+
public void onLoad(Object id, String entityClassName, Object entity, LockMode lockMode, boolean isAssociationFetch, Object result, LoadEventListener.LoadType loadType) {
65+
forEach(this.callbacks, callback -> callback.onLoad(id, entityClassName, entity, lockMode, isAssociationFetch, result, loadType));
6666
}
6767

6868
@Override

microsphere-hibernate-core/src/main/java/io/microsphere/hibernate/entity/EntityCallback.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,11 @@ public interface EntityCallback {
122122
* @param lockMode {@link LockMode}
123123
* @param isAssociationFetch
124124
* @param result
125-
* @param readOnly
126125
* @param loadType
127126
* @see Session#find(Class, Object)
128127
* @see LoadEventListener
129128
*/
130-
default void onLoad(Object id, String entityClassName, Object entity, LockMode lockMode, boolean isAssociationFetch, Object result, Boolean readOnly, LoadType loadType) {
129+
default void onLoad(Object id, String entityClassName, Object entity, LockMode lockMode, boolean isAssociationFetch, Object result, LoadType loadType) {
131130
}
132131

133132
/**

microsphere-hibernate-core/src/main/java/io/microsphere/hibernate/entity/EntityCallbackListener.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class EntityCallbackListener implements LoadEventListener, PersistEventListener,
159159
@Override
160160
public void onLoad(LoadEvent event, LoadType loadType) throws HibernateException {
161161
this.callback.onLoad(event.getEntityId(), event.getEntityClassName(), event.getInstanceToLoad(),
162-
getLockMode(event.getLockOptions()), event.isAssociationFetch(), event.getResult(), event.getReadOnly(), loadType);
162+
getLockMode(event.getLockOptions()), event.isAssociationFetch(), event.getResult(), loadType);
163163
}
164164

165165
@Override
@@ -360,9 +360,8 @@ public boolean requiresPostCommitHanding(EntityPersister persister) {
360360
return false;
361361
}
362362

363-
@Override
364363
public boolean requiresPostCommitHandling(EntityPersister persister) {
365-
return PostDeleteEventListener.super.requiresPostCommitHandling(persister);
364+
return false;
366365
}
367366

368367
/**

microsphere-hibernate-core/src/test/java/io/microsphere/hibernate/entity/TestEntityCallback.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ public class TestEntityCallback implements EntityCallback {
3838

3939
@Override
4040
public void onLoad(Object id, String entityClassName, Object entity, LockMode lockMode, boolean isAssociationFetch,
41-
Object result, Boolean readOnly, LoadEventListener.LoadType loadType) {
42-
logger.trace("onLoad - id : {}, entityClassName : {}, entity : {}, lockMode : {}, isAssociationFetch : {}, result : {}, readOnly : {}, loadType : {}",
43-
id, entityClassName, entity, lockMode, isAssociationFetch, result, readOnly, loadType);
44-
EntityCallback.super.onLoad(id, entityClassName, entity, lockMode, isAssociationFetch, result, readOnly, loadType);
41+
Object result, LoadEventListener.LoadType loadType) {
42+
logger.trace("onLoad - id : {}, entityClassName : {}, entity : {}, lockMode : {}, isAssociationFetch : {}, result : {}, loadType : {}",
43+
id, entityClassName, entity, lockMode, isAssociationFetch, result, loadType);
44+
EntityCallback.super.onLoad(id, entityClassName, entity, lockMode, isAssociationFetch, result, loadType);
4545
}
4646

4747
@Override

microsphere-hibernate-test/pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,20 @@
8383

8484
</dependencies>
8585

86+
<profiles>
87+
<profile>
88+
<id>java9+</id>
89+
<activation>
90+
<jdk>[9,)</jdk>
91+
</activation>
92+
<dependencies>
93+
<dependency>
94+
<groupId>javax.xml.bind</groupId>
95+
<artifactId>jaxb-api</artifactId>
96+
<optional>true</optional>
97+
</dependency>
98+
</dependencies>
99+
</profile>
100+
</profiles>
101+
86102
</project>

0 commit comments

Comments
 (0)