기본 admin id 추가
auth 예외 추가 json 기본설정 추가
This commit is contained in:
@@ -29,6 +29,7 @@ public class CommonConstants {
|
||||
public static final String FORMAT_DATE_MAIL_DATETIME = "yyyy/MM/dd/HH:mm:ss:SS";
|
||||
|
||||
public static final String TRANSACTION_ID_KEY = "TRANSACTION_ID";
|
||||
public static final String ADMIN_ID = "caliverse_adm@caliverse.io";
|
||||
|
||||
public static final int AI_MESSAGE_LIMIT_SIZE = 50;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,15 @@ public class AuthenticationConfig {
|
||||
return corsConfiguration;
|
||||
}))
|
||||
.authorizeHttpRequests()
|
||||
.requestMatchers("/api/v1/auth/login","/api/v1/auth/register","/v3/api-docs/**","/swagger-ui/**","swagger-ui.html", "/dev-test/**").permitAll() // login,register은 언제나 가능
|
||||
.requestMatchers(
|
||||
"/api/v1/auth/login",
|
||||
"/api/v1/auth/register",
|
||||
"/v3/api-docs/**",
|
||||
"/swagger-ui/**",
|
||||
"swagger-ui.html",
|
||||
"/dev-test/**",
|
||||
"/api/v1/admin/init-password"
|
||||
).permitAll() // login,register은 언제나 가능
|
||||
.requestMatchers(HttpMethod.POST,"/api/v1/**").authenticated()
|
||||
.anyRequest()
|
||||
.authenticated()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.caliverse.admin.global.configuration;
|
||||
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
@@ -7,6 +8,8 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
@Configuration
|
||||
public class JacksonConfig {
|
||||
|
||||
@@ -16,6 +19,9 @@ public class JacksonConfig {
|
||||
mapper.registerModule(new JavaTimeModule());
|
||||
mapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE); // 필요시
|
||||
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||
mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
|
||||
return mapper;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user