From 2cda4d3ec1c6cb3adeab812ebfc4dabb5eee5c3e Mon Sep 17 00:00:00 2001 From: AlexBob Date: Wed, 25 Oct 2023 15:13:53 +0800 Subject: [PATCH] ng update @angular/material --- .../platform/boot/commons/base/AbstractDatabase.java | 12 ++++++------ .../com/platform/boot/commons/query/ParamSql.java | 2 +- .../platform/boot/config/SecurityConfiguration.java | 1 - .../platform/boot/config/SessionConfiguration.java | 5 ++--- .../src/main/resources/application-local.yml | 2 +- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/boot/platform/src/main/java/com/platform/boot/commons/base/AbstractDatabase.java b/boot/platform/src/main/java/com/platform/boot/commons/base/AbstractDatabase.java index e814a14e..0a7f96e5 100644 --- a/boot/platform/src/main/java/com/platform/boot/commons/base/AbstractDatabase.java +++ b/boot/platform/src/main/java/com/platform/boot/commons/base/AbstractDatabase.java @@ -12,8 +12,8 @@ import reactor.core.publisher.Mono; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; -import java.util.List; import java.util.Map; /** @@ -60,9 +60,9 @@ protected Flux queryWithCache(Object key, Query query, Class entityCla protected Flux queryWithCache(Object key, String query, Map bindParams, Class entityClass) { // Create a GenericExecuteSpec object from the given query - var executeSpec = this.databaseClient.sql(() -> query); + DatabaseClient.GenericExecuteSpec executeSpec = this.databaseClient.sql(() -> query); // Bind the given parameters to the query - for (var e : bindParams.entrySet()) { + for (Map.Entry e : bindParams.entrySet()) { executeSpec = executeSpec.bind(e.getKey(), e.getValue()); } // Read the results of the query into an entity class @@ -82,7 +82,7 @@ protected Flux queryWithCache(Object key, String query, protected Flux queryWithCache(Object key, Flux sourceMono) { String cacheKey = key + ":data"; // Get data from cache - List cacheData = this.cache.get(cacheKey, ArrayList::new); + Collection cacheData = this.cache.get(cacheKey, ArrayList::new); // Note: the returned list will not be null assert cacheData != null; @@ -106,9 +106,9 @@ protected Mono countWithCache(Object key, Query query, Class entity protected Mono countWithCache(Object key, String query, Map bindParams) { // Create a GenericExecuteSpec object from the given query - var executeSpec = this.databaseClient.sql(() -> query); + DatabaseClient.GenericExecuteSpec executeSpec = this.databaseClient.sql(() -> query); // Bind the given parameters to the query - for (var e : bindParams.entrySet()) { + for (Map.Entry e : bindParams.entrySet()) { executeSpec = executeSpec.bind(e.getKey(), e.getValue()); } // Read the results of the query into an entity class diff --git a/boot/platform/src/main/java/com/platform/boot/commons/query/ParamSql.java b/boot/platform/src/main/java/com/platform/boot/commons/query/ParamSql.java index 462cf149..1176d7ef 100644 --- a/boot/platform/src/main/java/com/platform/boot/commons/query/ParamSql.java +++ b/boot/platform/src/main/java/com/platform/boot/commons/query/ParamSql.java @@ -17,7 +17,7 @@ public static ParamSql of(StringJoiner sql, Map params) { public String whereSql() { if (this.sql.length() > 0) { - return "Where " + this.sql; + return " Where " + this.sql; } return ""; } diff --git a/boot/platform/src/main/java/com/platform/boot/config/SecurityConfiguration.java b/boot/platform/src/main/java/com/platform/boot/config/SecurityConfiguration.java index e425af91..88c47c0d 100644 --- a/boot/platform/src/main/java/com/platform/boot/config/SecurityConfiguration.java +++ b/boot/platform/src/main/java/com/platform/boot/config/SecurityConfiguration.java @@ -158,7 +158,6 @@ public Mono commence(ServerWebExchange exchange, AuthenticationException e String requestedWith = exchange.getRequest().getHeaders().getFirst(xRequestedWith); log.error("认证失败! 信息: %s".formatted(e.getMessage())); - log.debug(e.getMessage(), e); if (requestedWith != null && requestedWith.contains(xmlHttpRequest)) { var response = exchange.getResponse(); diff --git a/boot/platform/src/main/java/com/platform/boot/config/SessionConfiguration.java b/boot/platform/src/main/java/com/platform/boot/config/SessionConfiguration.java index 059b04b2..c919a187 100644 --- a/boot/platform/src/main/java/com/platform/boot/config/SessionConfiguration.java +++ b/boot/platform/src/main/java/com/platform/boot/config/SessionConfiguration.java @@ -41,8 +41,7 @@ public WebSessionIdResolver webSessionIdResolver() { * CustomHeaderWebSessionIdResolver class. */ static class CustomHeaderWebSessionIdResolver extends HeaderWebSessionIdResolver { - private final CookieWebSessionIdResolver cookieWebSessionIdResolver = - new CookieWebSessionIdResolver(); + private final CookieWebSessionIdResolver cookieWebSessionIdResolver = new CookieWebSessionIdResolver(); @Override public void setSessionId(@NonNull ServerWebExchange exchange, @NonNull String id) { @@ -50,8 +49,8 @@ public void setSessionId(@NonNull ServerWebExchange exchange, @NonNull String id cookieWebSessionIdResolver.setSessionId(exchange, id); } - @Override @NonNull + @Override public List resolveSessionIds(@NonNull ServerWebExchange exchange) { List requestedWith = super.resolveSessionIds(exchange); if (ObjectUtils.isEmpty(requestedWith)) { diff --git a/boot/platform/src/main/resources/application-local.yml b/boot/platform/src/main/resources/application-local.yml index a73c4199..bce2fe8d 100644 --- a/boot/platform/src/main/resources/application-local.yml +++ b/boot/platform/src/main/resources/application-local.yml @@ -5,7 +5,7 @@ logging: com.platform.boot.*: debug org.springframework.web: debug org.springframework.r2dbc: debug - io.r2dbc.postgresql.QUERY: debug + #io.r2dbc.postgresql.QUERY: debug io.r2dbc.postgresql.PARAM: debug server.port: 8080