格式化代码。

main
ZhouXY108 2023-06-08 14:40:49 +08:00
parent c2735937cd
commit 3d2188199c
2 changed files with 13 additions and 16 deletions

View File

@ -6,7 +6,6 @@ import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.AuthenticationManager;

View File

@ -57,7 +57,6 @@ public class WebMvcConfig implements WebMvcConfigurer, CommandLineRunner {
for (RequestMappingInfo info : map.keySet()) { for (RequestMappingInfo info : map.keySet()) {
// 获取url // 获取url
PatternsRequestCondition pathPatternsCondition = info.getPatternsCondition(); PatternsRequestCondition pathPatternsCondition = info.getPatternsCondition();
if (pathPatternsCondition != null) {
Set<PathPattern> patterns = pathPatternsCondition.getPatterns() Set<PathPattern> patterns = pathPatternsCondition.getPatterns()
.stream() .stream()
.map(RequestUtils.defaultPathPatternParserInstance::parse) .map(RequestUtils.defaultPathPatternParserInstance::parse)
@ -73,7 +72,6 @@ public class WebMvcConfig implements WebMvcConfigurer, CommandLineRunner {
} }
} }
} }
}
logger.info("加载到{}个PathVariable路径:{}", Integer.valueOf(patternList.size()), patternList); logger.info("加载到{}个PathVariable路径:{}", Integer.valueOf(patternList.size()), patternList);
} catch (Exception e) { } catch (Exception e) {
logger.error("加载PathVariable路径失败", e); logger.error("加载PathVariable路径失败", e);