File tree Expand file tree Collapse file tree 4 files changed +11
-16
lines changed
src/main/java/io/quarkus/jaxb/deployment
src/main/java/io/quarkus/jaxb/runtime Expand file tree Collapse file tree 4 files changed +11
-16
lines changed Original file line number Diff line number Diff line change 5656 <version >${project.version} </version >
5757 </path >
5858 </annotationProcessorPaths >
59- <compilerArgs >
60- <arg >-AlegacyConfigRoot=true</arg >
61- </compilerArgs >
6259 </configuration >
6360 </execution >
6461 </executions >
Original file line number Diff line number Diff line change @@ -342,8 +342,8 @@ FilteredJaxbClassesToBeBoundBuildItem filterBoundClasses(
342342 .forEach (builder ::classNames );
343343
344344 // remove classes that have been excluded by users
345- if (config .excludeClasses .isPresent ()) {
346- builder .classNameExcludes (config .excludeClasses .get ());
345+ if (config .excludeClasses () .isPresent ()) {
346+ builder .classNameExcludes (config .excludeClasses () .get ());
347347 }
348348 return builder .build ();
349349 }
@@ -362,7 +362,7 @@ void bindClassesToJaxbContext(
362362 .resolveBeans (Type .create (DotName .createSimple (JAXBContext .class ), org .jboss .jandex .Type .Kind .CLASS ));
363363 if (!beans .isEmpty ()) {
364364 jaxbContextConfig .addClassesToBeBound (filteredClassesToBeBound .getClasses ());
365- if (config .validateJaxbContext ) {
365+ if (config .validateJaxbContext () ) {
366366 validateJaxbContext (filteredClassesToBeBound , beanResolver , beans );
367367 }
368368 }
Original file line number Diff line number Diff line change 7171 <version >${project.version} </version >
7272 </path >
7373 </annotationProcessorPaths >
74- <compilerArgs >
75- <arg >-AlegacyConfigRoot=true</arg >
76- </compilerArgs >
7774 </configuration >
7875 </execution >
7976 </executions >
Original file line number Diff line number Diff line change 33import java .util .List ;
44import java .util .Optional ;
55
6- import io .quarkus .runtime .annotations .ConfigItem ;
76import io .quarkus .runtime .annotations .ConfigPhase ;
87import io .quarkus .runtime .annotations .ConfigRoot ;
8+ import io .smallrye .config .ConfigMapping ;
9+ import io .smallrye .config .WithDefault ;
910
10- @ ConfigRoot (phase = ConfigPhase .BUILD_AND_RUN_TIME_FIXED , name = "jaxb" )
11- public class JaxbConfig {
11+ @ ConfigRoot (phase = ConfigPhase .BUILD_AND_RUN_TIME_FIXED )
12+ @ ConfigMapping (prefix = "quarkus.jaxb" )
13+ public interface JaxbConfig {
1214
1315 /**
1416 * If enabled, it will validate the default JAXB context at build time.
1517 */
16- @ ConfigItem ( defaultValue = "false" )
17- public boolean validateJaxbContext ;
18+ @ WithDefault ( "false" )
19+ boolean validateJaxbContext () ;
1820
1921 /**
2022 * Exclude classes to automatically be bound to the default JAXB context.
2123 * Values with suffix {@code .*}, i.e. {@code org.acme.*}, are considered packages and exclude all classes that are members
2224 * of these packages
2325 */
24- @ ConfigItem
25- public Optional <List <String >> excludeClasses ;
26+ Optional <List <String >> excludeClasses ();
2627}
You can’t perform that action at this time.
0 commit comments