SPR-8986 Add the ability to Scan Packages for JAXB Marshalling
Jaxb2Marshaller now has the capability to scan for classes annotated with JAXB2 annotations.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -279,6 +279,13 @@ public class Jaxb2MarshallerTests extends AbstractMarshallerTests {
|
||||
assertTrue("No XML written", writer.toString().length() > 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void supportsPackagesToScan() throws Exception {
|
||||
marshaller = new Jaxb2Marshaller();
|
||||
marshaller.setPackagesToScan(new String[] {CONTEXT_PATH});
|
||||
marshaller.afterPropertiesSet();
|
||||
}
|
||||
|
||||
@XmlRootElement
|
||||
public static class DummyRootElement {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user