我有一个问题,用jaxb创建枚举来生成我想要的xml,我试图使用@xmlEnum注释但不使用属性!
我会举一个例子来澄清:
XML
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<FilePollerConfiguration configFilePath="">
<Directory path="C://Users//jmoreau040612//Desktop//Old">
<Match pattern="*.xml">
<Event name="create | modify | delete"> //here i want the enum in attribute
<FTPSend>
<FTPServer>toto.sgcib.com</FTPServer>
<FTPPort>21</FTPPort>
<FTPLogin>toto</FTPLogin>
<FTPPassword>titi</FTPPassword>
<FTPDestinationPath>/root/src</FTPDestinationPath>
</FTPSend>
</Event>
</Match>
<Match pattern="*.csv">
<Event name="create | modify | delete"> //here i want the enum in attribute
<MailSend>
<SMTPServer>smtp.fr.socgen</SMTPServer>
<SMTPPort>25</SMTPPort>
<MailTo>toto@sgcib.com</MailTo>
<MailFrom>titi@sgcib.com</MailFrom>
<Subject>tata</Subject>
<Body>blabla</Body>
</MailSend>
</Event>
</Match>
</Directory>
</FilePollerConfiguration>
Run Code Online (Sandbox Code Playgroud)
和我有塔下面的代码的Java部分:
@XmlAccessorType(XmlAccessType.FIELD)
public class Event {
//I would like this enum in attribute of "Event" …Run Code Online (Sandbox Code Playgroud) 我刚刚在youtube上关注了有关角度的教程,但由于出现routeProvider问题,我无法执行代码.我试图包含angular-route.js的好链接,但它仍然不起作用......
我给你看了代码:
<!DOCTYPE html>
<html ng-app="demoApp">
<head>
<title>Tuto Angular</title>
</head>
<body>
<div>
<div ng-view=""></div>
</div>
<script src="angular.min.js" type="text/javascript"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular-route.js"></script>
<script type="text/javascript">
var demoApp = angular.module('demoApp', ['ng-route']);
demoApp.config(function ($routeProvider){
$routeProvider
.when('/',
{
controller: 'SimpleController',
templateUrl: 'Partials/View1.html'
})
.when('/view2',{
controller: 'SimpleController',
templateUrl: 'Partials/View2.html'
})
.otherwise({ redirectTo: '/' });
});
demoApp.controller('SimpleController', function ($scope){
$scope.customers = [
{name:'John Smith', city:'Phoenix'},
{name:'John Doe', city:'New York'},
{name:'Jane Doe', city:'Chicago'}
];
$scope.addCustomer = function (){
$scope.customers.push(
{
name: $scope.newCustomer.name,
city: $scope.newCustomer.city …Run Code Online (Sandbox Code Playgroud)