File tree 4 files changed +11
-16
lines changed
src/main/java/io/quarkus/jaxb/deployment
src/main/java/io/quarkus/jaxb/runtime
4 files changed +11
-16
lines changed Original file line number Diff line number Diff line change 56
56
<version >${project.version} </version >
57
57
</path >
58
58
</annotationProcessorPaths >
59
- <compilerArgs >
60
- <arg >-AlegacyConfigRoot=true</arg >
61
- </compilerArgs >
62
59
</configuration >
63
60
</execution >
64
61
</executions >
Original file line number Diff line number Diff line change @@ -342,8 +342,8 @@ FilteredJaxbClassesToBeBoundBuildItem filterBoundClasses(
342
342
.forEach (builder ::classNames );
343
343
344
344
// 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 ());
347
347
}
348
348
return builder .build ();
349
349
}
@@ -362,7 +362,7 @@ void bindClassesToJaxbContext(
362
362
.resolveBeans (Type .create (DotName .createSimple (JAXBContext .class ), org .jboss .jandex .Type .Kind .CLASS ));
363
363
if (!beans .isEmpty ()) {
364
364
jaxbContextConfig .addClassesToBeBound (filteredClassesToBeBound .getClasses ());
365
- if (config .validateJaxbContext ) {
365
+ if (config .validateJaxbContext () ) {
366
366
validateJaxbContext (filteredClassesToBeBound , beanResolver , beans );
367
367
}
368
368
}
Original file line number Diff line number Diff line change 71
71
<version >${project.version} </version >
72
72
</path >
73
73
</annotationProcessorPaths >
74
- <compilerArgs >
75
- <arg >-AlegacyConfigRoot=true</arg >
76
- </compilerArgs >
77
74
</configuration >
78
75
</execution >
79
76
</executions >
Original file line number Diff line number Diff line change 3
3
import java .util .List ;
4
4
import java .util .Optional ;
5
5
6
- import io .quarkus .runtime .annotations .ConfigItem ;
7
6
import io .quarkus .runtime .annotations .ConfigPhase ;
8
7
import io .quarkus .runtime .annotations .ConfigRoot ;
8
+ import io .smallrye .config .ConfigMapping ;
9
+ import io .smallrye .config .WithDefault ;
9
10
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 {
12
14
13
15
/**
14
16
* If enabled, it will validate the default JAXB context at build time.
15
17
*/
16
- @ ConfigItem ( defaultValue = "false" )
17
- public boolean validateJaxbContext ;
18
+ @ WithDefault ( "false" )
19
+ boolean validateJaxbContext () ;
18
20
19
21
/**
20
22
* Exclude classes to automatically be bound to the default JAXB context.
21
23
* Values with suffix {@code .*}, i.e. {@code org.acme.*}, are considered packages and exclude all classes that are members
22
24
* of these packages
23
25
*/
24
- @ ConfigItem
25
- public Optional <List <String >> excludeClasses ;
26
+ Optional <List <String >> excludeClasses ();
26
27
}
You can’t perform that action at this time.
0 commit comments