简体   繁体   English

关于 `jersey.config.server.provider.scanning.recursive` 参数,我应该考虑什么?

[英]What should I take into consideration regarding the `jersey.config.server.provider.scanning.recursive` parameter?

According to the Oracle documentation for Building, Packaging, and Deploying RESTful Web Service Applications there is a parameter jersey.config.server.provider.scanning.recursive that can be used to modify the servlets configurations. According to the Oracle documentation for Building, Packaging, and Deploying RESTful Web Service Applications there is a parameter jersey.config.server.provider.scanning.recursive that can be used to modify the servlets configurations.

Example of web.xml file if a class that extends javax.ws.rs.core.Application is not packaged.如果扩展javax.ws.rs.core.Application的 class 未打包,则 web.xml 文件的示例。 This is for Pre-3.0 Servlets:这适用于 3.0 之前的 Servlets:

<web-app>
    <servlet> 
        <servlet-name>Jersey Web Application</servlet-name>
        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
        <init-param>
           <param-name>jersey.config.server.provider.packages</param-name>
           <param-value>org.foo.myresources,org.bar.otherresources</param-value>
        </init-param>
        <init-param>
           <param-name>jersey.config.server.provider.scanning.recursive</param-name>
           <param-value>false</param-value>
        </init-param>
        ...
    </servlet>
    ...
</web-app>

Now, there is not any documentation explaining exactly what does this parameter does and how to use it.现在,没有任何文档准确解释此参数的作用以及如何使用它。

Question:问题:

So, what should I take into consideration regarding the jersey.config.server.provider.scanning.recursive parameter when Building, Packaging, and Deploying RESTful Web Service Applications?那么,在构建、打包和部署 RESTful Web 服务应用程序时,关于jersey.config.server.provider.scanning.recursive参数我应该考虑什么?

Inside the jersey github project ( jersey/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java#L108 ) there is a formal description for this property:在 jersey github 项目( jersey/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java#L108 )中有一个正式的描述:

Sets the recursion strategy for package scanning.设置 package 扫描的递归策略。

The value of true indicates that the list of provided package names should be scanned recursively including any nested packages.true表示应递归扫描提供的 package 名称列表,包括任何嵌套包。 Value of false indicates that only packages in the list should be scanned.值为false表示仅应扫描列表中的包。 In such case any nested packages will be ignored.在这种情况下,任何嵌套的包都将被忽略。

The property value MUST be an instance of Boolean type or a String convertible to Boolean type.属性值必须是Boolean类型的实例或可转换为Boolean类型的String

A default value is true .默认值为true

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在一次向数据库中插入一百万条记录之前,我应该采取什么措施? - What measures should I take before inserting one million records to database at one time? Oracle的Optimizer是否考虑了子查询的基础列? - Does Oracle's Optimizer Take into Consideration a Subquery's Underlying Columns? 我应该使用什么命令来获取Toad for Oracle中参数的实际值? - What command should I use to get the actual value of a parameter in Toad for Oracle? 我应该绑定哪种数据类型作为查询参数,以与Oracle ODBC中的NUMBER(15)列一起使用? - What datatype should I bind as query parameter to use with NUMBER(15) column in Oracle ODBC? 我应该制定什么指数? - What index i should make? 我应该在MS SQL服务器中安装什么Oracle驱动程序,以便能够使用DTS将数据从Oracle服务器复制到MS SQL服务器? - What Oracle driver should I install in my MS SQL server to be able to use DTS to copy data from the Oracle server to the MS SQL server? 如果是oracle raw输出参数,DbType应该是什么 - What should be the DbType in case of oracle raw output parameter 我必须在ORACLE中使用什么Join? - What Join should i have to use in ORACLE? 什么时候指定setFetchSize()? - What and when should I specify setFetchSize()? 我应该使用触发器或约束什么? - What should I use triggers or constraints?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM