jersey2.9集成spring4之后为什么注入不了数据~~~~~~~~~~
小菜鸟的梦
2017-11-18
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0" id="WebApp_1470042873706"> <display-name>Archetype Created Web Application</display-name> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>jersey-serlvet</servlet-name> <!-- 与Jersey1有区别 --> <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class> <!-- <servlet-class>org.glassfish.jersey.servlet.</servlet-class> --> <!-- 配置自己的资源加载类去加载资源 --><!-- 建议用此方法,可控性强,不建议用默认的资源加载类 --> <init-param> <param-name>javax.ws.rs.Application</param-name> <param-value>demo.config.RESTServiceConfig</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <!-- Spring 配置文件路径 --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml</param-value> </context-param> <servlet-mapping> <servlet-name>jersey-serlvet</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> </web-app> |
相关讨论
相关资源推荐
- jersey spring_教程–带有Jersey和Spring的Java REST API设计和实现
- jersey_教程–带有Jersey和Spring的Java REST API设计和实现
- jersey学习笔记3-集成服务
- Spring Boot中文文档(官方文档翻译 基于1.5.2.RELEASE)
- Spring Cloud 中文文档
- Rest的API解决方案(jersey与swagger集成)
- Spring Boot 2.2版本变化[翻译]
- spring cloud脚手架搭建
- spring boot 2.x创建spring cloud eureka server
- Spring Boot 1.5.2.RELEASE中文版