web.xml:


















WmsLayerHandler.java:
1
package com.exjour.web.handler.layer;
2
3
import java.util.List;
4
5
import org.directwebremoting.annotations.Param;
6
import org.directwebremoting.annotations.RemoteMethod;
7
import org.directwebremoting.annotations.RemoteProxy;
8
import org.directwebremoting.spring.SpringCreator;
9
10
import com.exjour.bean.layer.WmsLayerBean;
11
import com.exjour.service.layer.WmsLayerService;
12
import com.exjour.web.handler.BaseHandler;
13
14
@RemoteProxy(creator = SpringCreator.class,
15
creatorParams = @Param(name = "beanName", value = "wmsLayerHandler"))
16
public class WmsLayerHandler extends BaseHandler {
17
18
private WmsLayerService wmsLayerService;
19
20
public WmsLayerService getWmsLayerService() {
21
return wmsLayerService;
22
}
23
24
public void setWmsLayerService(WmsLayerService wmsLayerService) {
25
this.wmsLayerService = wmsLayerService;
26
}
27
28
@RemoteMethod
29
public List<WmsLayerBean> getWmsLayerList() {
30
return wmsLayerService.getWmsLayerList();
31
}
32
}
33
其中绿色部分为Annotations,红色部分表示使用SpringCreator,粉色部分表示使用applicationContext中的"wmsLayerHandler" bean.
2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

WmsLayerBean.java:



























































