OCT 1. 修正代码语法检查

This commit is contained in:
黄昕 2024-02-04 10:12:29 +08:00
parent c227c80376
commit a3cccb6e12
5 changed files with 3 additions and 19 deletions

View File

@ -64,9 +64,7 @@ public class SecuritySecurity {
http.authorizeHttpRequests(resp -> {
// 配置文件中配置的白名单
userSecurityConfigure.getWhiteList().forEach(k -> {
resp.requestMatchers(k.getMethod(), k.getUrl()).permitAll();
});
userSecurityConfigure.getWhiteList().forEach(k -> resp.requestMatchers(k.getMethod(), k.getUrl()).permitAll());
resp.requestMatchers("/api/**").access(customAuthorizationManager);
})

View File

@ -3,9 +3,9 @@ package com.cmhi.cf.exception;
import com.cmhi.cf.common.ErrorCode;
public class CommonErrorCodeException extends RuntimeException{
private ErrorCode err;
private final ErrorCode err;
private String[] description;
private final String[] description;
public CommonErrorCodeException(ErrorCode err) {
super(err.getDescription());

View File

@ -93,15 +93,6 @@ public class HelperUtils {
public static String getCurrentDatetime() {
return LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
}
//
// @SuppressWarnings("unchecked")
// public static <T> BaseBinaryProtocol<T> CastBaseBinaryProtocol(Object obj) {
// return (BaseBinaryProtocol<T>)obj;
// }
//
// private HelperUtils() {
// throw new UnsupportedOperationException();
// }
public static <T> String getJson(T obj) throws JsonProcessingException {
return OBJ_MAPPER.writeValueAsString(obj);

View File

@ -4,8 +4,6 @@ import com.cmhi.cf.common.ErrorCode;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.bind.DefaultValue;
@Data
@AllArgsConstructor
@NoArgsConstructor

View File

@ -5,14 +5,11 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@NoArgsConstructor