Jetty实战之 嵌入式Jetty集成Spring运行

本文链接:http://blog.csdn.net/kongxx/article/details/7227107

1. 首先修改pom.xml文件,添加spring的依赖项

2. 创建一个Server类,用来通过spring来启动Jetty server

3. 创建一个Handler类,用了处理http请求

4. 创建一个spring配置文件,并放在com/google/code/garbagecan/jettystudy/sample4/spring.xml位置,内容如下.
其中定义了Jetty Server的配置,包括Connector和Handler等等。
5. 运行MyServer类,然后通过http://localhost:8080/来访问。









你可能感兴趣的:(spring)