Skip to content

Commit cf8d8bd

Browse files
committed
Don't clutter log with messages about missing JAXB, as Cindy is not using JAXB.
1 parent d5e9f6b commit cf8d8bd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/java/CindyBootstrap.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,15 @@ public void run() {
299299
}
300300

301301
private static class CindyApplication extends Application {
302+
@Override
303+
public Map<String, Object> getProperties() {
304+
// As we're post Java 11, there is no JAXB in the JRE, so JAX-RS would complain about "missing" JAXB.
305+
// Log cluttering is prevented by disabling unused JAXB-dependent features.
306+
return Map.of(
307+
"jersey.config.disableDefaultProvider", "ALL", // We don't use JAX-RS default providers, e.g. JAXB
308+
"jersey.config.server.wadl.disableWadl", true); // We don't use WADL
309+
}
310+
302311
@Override
303312
public Set<Class<?>> getClasses() {
304313
return Set.of(CindyResource.class);

0 commit comments

Comments
 (0)