org.apache.catalina.Wrapper.setServletSecurityAnnotationScanRequired()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(167)

本文整理了Java中org.apache.catalina.Wrapper.setServletSecurityAnnotationScanRequired()方法的一些代码示例,展示了Wrapper.setServletSecurityAnnotationScanRequired()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wrapper.setServletSecurityAnnotationScanRequired()方法的具体详情如下:
包路径:org.apache.catalina.Wrapper
类名称:Wrapper
方法名:setServletSecurityAnnotationScanRequired

Wrapper.setServletSecurityAnnotationScanRequired介绍

[英]Set the flag that indicates javax.servlet.annotation.ServletSecurity annotations must be scanned when the Servlet is first used.
[中]设置指示javax的标志。servlet。注释。首次使用Servlet时,必须扫描Servlet安全注释。

代码示例

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * hook to register that we need to scan for security annotations.
 * @param wrapper   The wrapper for the Servlet that was added
 */
public ServletRegistration.Dynamic dynamicServletAdded(Wrapper wrapper) {
  Servlet s = wrapper.getServlet();
  if (s != null && createdServlets.contains(s)) {
    // Mark the wrapper to indicate annotations need to be scanned
    wrapper.setServletSecurityAnnotationScanRequired(true);
  }
  return new ApplicationServletRegistration(wrapper, this);
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * hook to register that we need to scan for security annotations.
 * @param wrapper   The wrapper for the Servlet that was added
 */
public ServletRegistration.Dynamic dynamicServletAdded(Wrapper wrapper) {
  Servlet s = wrapper.getServlet();
  if (s != null && createdServlets.contains(s)) {
    // Mark the wrapper to indicate annotations need to be scanned
    wrapper.setServletSecurityAnnotationScanRequired(true);
  }
  return new ApplicationServletRegistration(wrapper, this);
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * hook to register that we need to scan for security annotations.
 * @param wrapper   The wrapper for the Servlet that was added
 */
public ServletRegistration.Dynamic dynamicServletAdded(Wrapper wrapper) {
  Servlet s = wrapper.getServlet();
  if (s != null && createdServlets.contains(s)) {
    // Mark the wrapper to indicate annotations need to be scanned
    wrapper.setServletSecurityAnnotationScanRequired(true);
  }
  return new ApplicationServletRegistration(wrapper, this);
}

相关文章