我看过很多以类似的东西开头的泽西教程
@ApplicationPath("services")
public class JerseyApplication extends ResourceConfig {
public JerseyApplication() {
packages("com.abc.jersey.services");
}
}
Run Code Online (Sandbox Code Playgroud)
没有解释这个ResourceConfig类究竟是什么.那么我在哪里可以找到它的文档,用法等?谷歌搜索"泽西资源配置"不会产生任何官方文档.
关于这个课程及其用法的一些问题是:
ResourceConfig?ResourceConfig某个地方的子类以便可以找到它或者它是否被泽西自动检测到?ResourceConfig?ResourceConfig是和web.xml文件一样吗?如果是这样的话,如果我在我的项目中同时出现这种情 其中一个优先于另一个吗?我试图通过maven的帮助正常创建泽西但是我总是像scrennshoot一样得到这个结构并且通常没有错误?!它看起来不像泽西岛常见的布局.
我正在使用这个:
org.glassfish.jersey.archetypes
jersey-quickstart-webapp
2.16
Run Code Online (Sandbox Code Playgroud)

pom.xml中:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.test</groupId>
<artifactId>serverSide</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>serverSide</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Run Code Online (Sandbox Code Playgroud)