Skip to content

Commit

Permalink
ng update @angular/material
Browse files Browse the repository at this point in the history
  • Loading branch information
vnobo committed Oct 25, 2023
1 parent 6462ed8 commit 2cda4d3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -60,9 +60,9 @@ protected <T> Flux<T> queryWithCache(Object key, Query query, Class<T> entityCla
protected <T> Flux<T> queryWithCache(Object key, String query,
Map<String, Object> bindParams, Class<T> 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<String, Object> e : bindParams.entrySet()) {
executeSpec = executeSpec.bind(e.getKey(), e.getValue());
}
// Read the results of the query into an entity class
Expand All @@ -82,7 +82,7 @@ protected <T> Flux<T> queryWithCache(Object key, String query,
protected <T> Flux<T> queryWithCache(Object key, Flux<T> sourceMono) {
String cacheKey = key + ":data";
// Get data from cache
List<T> cacheData = this.cache.get(cacheKey, ArrayList::new);
Collection<T> cacheData = this.cache.get(cacheKey, ArrayList::new);
// Note: the returned list will not be null
assert cacheData != null;

Expand All @@ -106,9 +106,9 @@ protected <T> Mono<Long> countWithCache(Object key, Query query, Class<T> entity

protected Mono<Long> countWithCache(Object key, String query, Map<String, Object> 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<String, Object> e : bindParams.entrySet()) {
executeSpec = executeSpec.bind(e.getKey(), e.getValue());
}
// Read the results of the query into an entity class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static ParamSql of(StringJoiner sql, Map<String, Object> params) {

public String whereSql() {
if (this.sql.length() > 0) {
return "Where " + this.sql;
return " Where " + this.sql;
}
return "";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ public Mono<Void> 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,16 @@ 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) {
super.setSessionId(exchange, id);
cookieWebSessionIdResolver.setSessionId(exchange, id);
}

@Override
@NonNull
@Override
public List<String> resolveSessionIds(@NonNull ServerWebExchange exchange) {
List<String> requestedWith = super.resolveSessionIds(exchange);
if (ObjectUtils.isEmpty(requestedWith)) {
Expand Down
2 changes: 1 addition & 1 deletion boot/platform/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2cda4d3

Please sign in to comment.