cleanup generated files (#1705)
* upgrade to spring boot 1.5.2
* add full update to REST API
* modify ratings controller
* upgrade herold
* fix integration test
* fix integration test
* minor fix
* fix integration test
* fix integration test
* minor cleanup
* minor cleanup
* remove log4j properties
* use standard logbook.xml
* remove log4j dependencies
* remove commons-logging
* merge
* fix conflict
* exclude commons-logging dependency
* cleanup
* minor fix
* minor fix
* fix dependency issues
* Revert "fix dependency issues"
This reverts commit 83bf1f9fd2.
* fix dependency issues
* minor fix
* minor fix
* minor fix
* cleanup generated files
This commit is contained in:
@@ -135,6 +135,9 @@
|
||||
</sources>
|
||||
<outputDirectory>${basedir}/src/main/java</outputDirectory>
|
||||
<clearOutputDir>false</clearOutputDir>
|
||||
<noGeneratedHeaderComments>true</noGeneratedHeaderComments>
|
||||
<extension>true</extension>
|
||||
<generateEpisode>false</generateEpisode>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
|
||||
48
jaxb/src/main/java/com/baeldung/jaxb/gen/ObjectFactory.java
Normal file
48
jaxb/src/main/java/com/baeldung/jaxb/gen/ObjectFactory.java
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
package com.baeldung.jaxb.gen;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* This object contains factory methods for each
|
||||
* Java content interface and Java element interface
|
||||
* generated in the com.baeldung.jaxb.gen package.
|
||||
* <p>An ObjectFactory allows you to programatically
|
||||
* construct new instances of the Java representation
|
||||
* for XML content. The Java representation of XML
|
||||
* content can consist of schema derived interfaces
|
||||
* and classes representing the binding of schema
|
||||
* type definitions, element declarations and model
|
||||
* groups. Factory methods for each of these are
|
||||
* provided in this class.
|
||||
*
|
||||
*/
|
||||
@XmlRegistry
|
||||
public class ObjectFactory {
|
||||
|
||||
|
||||
/**
|
||||
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.baeldung.jaxb.gen
|
||||
*
|
||||
*/
|
||||
public ObjectFactory() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link UserRequest }
|
||||
*
|
||||
*/
|
||||
public UserRequest createUserRequest() {
|
||||
return new UserRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link UserResponse }
|
||||
*
|
||||
*/
|
||||
public UserResponse createUserResponse() {
|
||||
return new UserResponse();
|
||||
}
|
||||
|
||||
}
|
||||
87
jaxb/src/main/java/com/baeldung/jaxb/gen/UserRequest.java
Normal file
87
jaxb/src/main/java/com/baeldung/jaxb/gen/UserRequest.java
Normal file
@@ -0,0 +1,87 @@
|
||||
|
||||
package com.baeldung.jaxb.gen;
|
||||
|
||||
import java.io.Serializable;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
* <p>Java class for UserRequest complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="UserRequest">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/>
|
||||
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "UserRequest", propOrder = {
|
||||
"id",
|
||||
"name"
|
||||
})
|
||||
@XmlRootElement(name = "userRequest")
|
||||
public class UserRequest
|
||||
implements Serializable
|
||||
{
|
||||
|
||||
private final static long serialVersionUID = -1L;
|
||||
protected int id;
|
||||
@XmlElement(required = true)
|
||||
protected String name;
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
*/
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
*/
|
||||
public void setId(int value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
||||
}
|
||||
149
jaxb/src/main/java/com/baeldung/jaxb/gen/UserResponse.java
Normal file
149
jaxb/src/main/java/com/baeldung/jaxb/gen/UserResponse.java
Normal file
@@ -0,0 +1,149 @@
|
||||
|
||||
package com.baeldung.jaxb.gen;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Calendar;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
import org.w3._2001.xmlschema.Adapter1;
|
||||
|
||||
|
||||
/**
|
||||
* <p>Java class for UserResponse complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="UserResponse">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/>
|
||||
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||
* <element name="gender" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||
* <element name="created" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "UserResponse", propOrder = {
|
||||
"id",
|
||||
"name",
|
||||
"gender",
|
||||
"created"
|
||||
})
|
||||
@XmlRootElement(name = "userResponse")
|
||||
public class UserResponse
|
||||
implements Serializable
|
||||
{
|
||||
|
||||
private final static long serialVersionUID = -1L;
|
||||
protected int id;
|
||||
@XmlElement(required = true)
|
||||
protected String name;
|
||||
@XmlElement(required = true)
|
||||
protected String gender;
|
||||
@XmlElement(required = true, type = String.class)
|
||||
@XmlJavaTypeAdapter(Adapter1 .class)
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected Calendar created;
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
*/
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
*/
|
||||
public void setId(int value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the gender property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the gender property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setGender(String value) {
|
||||
this.gender = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the created property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public Calendar getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the created property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setCreated(Calendar value) {
|
||||
this.created = value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.baeldung.com/jaxb/gen", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
|
||||
package com.baeldung.jaxb.gen;
|
||||
23
jaxb/src/main/java/org/w3/_2001/xmlschema/Adapter1.java
Normal file
23
jaxb/src/main/java/org/w3/_2001/xmlschema/Adapter1.java
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
package org.w3._2001.xmlschema;
|
||||
|
||||
import java.util.Calendar;
|
||||
import javax.xml.bind.annotation.adapters.XmlAdapter;
|
||||
|
||||
public class Adapter1
|
||||
extends XmlAdapter<String, Calendar>
|
||||
{
|
||||
|
||||
|
||||
public Calendar unmarshal(String value) {
|
||||
return (javax.xml.bind.DatatypeConverter.parseDateTime(value));
|
||||
}
|
||||
|
||||
public String marshal(Calendar value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
return (javax.xml.bind.DatatypeConverter.printDateTime(value));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user