あなたは、次のコードのように、あなたのSchemaOutputResolver
を定義することにより、XSDファイル名にあなたを指定することができますが示しています
public void generate() throws IOException, JAXBException {
JAXBContext jaxbContext = JAXBContext.newInstance(GlobalConfig.class);
SchemaOutputResolver sor = new MySchemaOutputResolver();
jaxbContext.generateSchema(sor);
}
private class MySchemaOutputResolver extends SchemaOutputResolver {
@Override
public Result createOutput(String namespaceUri, String suggestedFileName) throws IOException {
File file = new File("your_desired_name.xsd");
StreamResult result = new StreamResult(file);
result.setSystemId(file.toURI().toURL().toString());
return result;
}
}
その他の関連: