로깅 변경

This commit is contained in:
Rinjae
2025-09-30 13:12:56 +09:00
parent 696350f8f3
commit a095ee7819
4 changed files with 35 additions and 17 deletions
@@ -5,10 +5,8 @@ import com.eactive.apim.portal.apps.user.service.PortalUserAuthService;
import com.eactive.apim.portal.common.user.PortalAuthenticatedUser;
import com.eactive.apim.portal.portalorg.entity.PortalOrgEnums;
import com.eactive.apim.portal.portaluser.entity.PortalUserEnums;
import java.util.Base64;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.authentication.*;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
@@ -17,9 +15,12 @@ import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Base64;
@Service
@Transactional
@RequiredArgsConstructor
@Slf4j
public class PortalAuthenticationManager implements AuthenticationManager {
private final PortalUserAuthService portalUserAuthService;
@@ -73,7 +74,8 @@ public class PortalAuthenticationManager implements AuthenticationManager {
if (user.getPortalOrg() != null) {
if (!user.getPortalOrg().getApprovalStatus().equals(PortalOrgEnums.ApprovalStatus.COMPLETED)) {
throw new DisabledException("로그인할 수 없습니다. 관리자에게 문의하세요.");
log.debug("기업사용자 - getApprovalStatus : {} / - org.approvalStatus : {}", user.getApprovalStatus(), user.getPortalOrg().getApprovalStatus());
throw new DisabledException("로그인할 수 없습니다. 관리자에게 문의하세요. (법인 승인대기중)");
}
}
@@ -59,6 +59,8 @@ public class PortalConfigPortalDatasource {
log.error("Profile property 'schema' is empty. Please check your configuration.");
throw new IllegalArgumentException("'ems.datasource.schema' is not configured.");
}
System.setProperty("ems.schema", emsDatasourceProperties.getSchema());
}
@Primary
@@ -126,7 +128,7 @@ public class PortalConfigPortalDatasource {
properties.put("hibernate.dialect", "org.hibernate.dialect.Oracle12cDialect");
properties.put("hibernate.format_sql", "true");
properties.put("hibernate.physical_naming_strategy", "com.eactive.apim.portal.common.entity.CustomPhysicalNamingStrategy");
properties.put("hibernate.show_sql", "true");
// properties.put("hibernate.show_sql", "true");
properties.put("hibernate.transaction.jta.platform", "org.hibernate.engine.transaction.jta.platform.internal.AtomikosJtaPlatform");
properties.put("hibernate.use_sql_comments", "true");
properties.put("hibernate.default_schema", emsDatasourceProperties.getSchema());