RESTEasy 的注册以及配置
万事从配置开始,那么,如何在我们的project 中注册RESTEasy呢?
官方提供如下三个方法
1.RESTEasy as servlet
<web-app> <listener> <listener-class> org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap </listener-class> </listener> <!-- ** INSERT YOUR LISTENERS HERE!!!! --> <servlet> <servlet-name>Resteasy</servlet-name> <servlet-class> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher </servlet-class> </servlet> <servlet-mapping> <servlet-name>Resteasy</servlet-name> <url-pattern>/resteasy/*</url-pattern> </servlet-mapping></web-app>