Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
smthing committed Nov 26, 2024
1 parent 6cdb49a commit 29149b9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pages/src/content/docs/guides/about.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Smart-Servlet is a lightweight servlet container based on Jakarta Servlet 6.1 fo
</dependency>
<!-- Use smart-servlet instead -->
<dependency>
<groupId>org.smartboot.servlet</groupId>
<groupId>tech.smartboot.servlet</groupId>
<artifactId>smart-servlet-spring-boot-starter</artifactId>
<version>${latest version number}</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion pages/src/content/docs/zh-cn/guides/about.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ smart-servlet 是一个基于 Jakarta Servlet 6.1 的轻量级 Servlet 容器,
</dependency>
<!-- Use smart-servlet instead -->
<dependency>
<groupId>org.smartboot.servlet</groupId>
<groupId>tech.smartboot.servlet</groupId>
<artifactId>smart-servlet-spring-boot-starter</artifactId>
<version>${最新版本号}</version>
<!--最新版本 -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ public void handleRequest(HandlerContext handlerContext) throws ServletException
}
ServletContext servletContext = handlerContext.getServletContext();
List<ServletRequestListener> servletRequestListeners = handlerContext.getServletContext().getDeploymentInfo().getServletRequestListeners();
ServletRequestEvent servletRequestEvent = servletRequestListeners.isEmpty() ? null : new ServletRequestEvent(servletContext, handlerContext.getRequest());
if (servletRequestListeners.isEmpty()) {
doNext(handlerContext);
return;
}
ServletRequestEvent servletRequestEvent = new ServletRequestEvent(servletContext, handlerContext.getRequest());
servletRequestListeners.forEach(requestListener -> {
requestListener.requestInitialized(servletRequestEvent);
LOGGER.info("requestInitialized " + requestListener);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ public boolean login(SmartHttpServletRequest request, ServletResponse resp, Serv
if (!ok) {
return ok;
}
if (deploymentInfo.getSecurityConstraints().isEmpty()) {
return true;
}
return check(request, response, deploymentInfo.getSecurityConstraints().stream().filter(securityConstraint -> {
for (UrlPattern urlPattern : securityConstraint.getUrlPatterns()) {
if (PathMatcherUtil.matches(request, urlPattern)) {
Expand Down

0 comments on commit 29149b9

Please sign in to comment.