-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
159 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
api/quiz-api/src/main/java/com/c4soft/quiz/RuntimeHintsConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.c4soft.quiz; | ||
|
||
import java.util.List; | ||
import org.springframework.aot.hint.MemberCategory; | ||
import org.springframework.aot.hint.RuntimeHints; | ||
import org.springframework.aot.hint.RuntimeHintsRegistrar; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.ImportRuntimeHints; | ||
import liquibase.database.LiquibaseTableNamesFactory; | ||
import liquibase.report.ShowSummaryGeneratorFactory; | ||
import liquibase.ui.LoggerUIService; | ||
|
||
@Configuration | ||
@ImportRuntimeHints({RuntimeHintsConfiguration.LiquibaseRuntimeHints.class}) | ||
public class RuntimeHintsConfiguration { | ||
|
||
static class LiquibaseRuntimeHints implements RuntimeHintsRegistrar { | ||
@Override | ||
public void registerHints(RuntimeHints hints, ClassLoader classLoader) { | ||
List.of(LoggerUIService.class, LiquibaseTableNamesFactory.class, | ||
ShowSummaryGeneratorFactory.class) | ||
.forEach(clazz -> hints.reflection().registerType(clazz, | ||
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_DECLARED_METHODS)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters