diff --git a/src/main/java/com/eactive/apim/portal/config/PortalAuthenticationManager.java b/src/main/java/com/eactive/apim/portal/config/PortalAuthenticationManager.java index e089e85..138effb 100644 --- a/src/main/java/com/eactive/apim/portal/config/PortalAuthenticationManager.java +++ b/src/main/java/com/eactive/apim/portal/config/PortalAuthenticationManager.java @@ -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("로그인할 수 없습니다. 관리자에게 문의하세요. (법인 승인대기중)"); } } diff --git a/src/main/java/com/eactive/apim/portal/config/PortalConfigPortalDatasource.java b/src/main/java/com/eactive/apim/portal/config/PortalConfigPortalDatasource.java index 265bd60..11c8552 100644 --- a/src/main/java/com/eactive/apim/portal/config/PortalConfigPortalDatasource.java +++ b/src/main/java/com/eactive/apim/portal/config/PortalConfigPortalDatasource.java @@ -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()); diff --git a/src/main/resources/application-gf63.yml b/src/main/resources/application-gf63.yml index d1f7b7e..2b27b6b 100644 --- a/src/main/resources/application-gf63.yml +++ b/src/main/resources/application-gf63.yml @@ -6,7 +6,7 @@ spring: jpa: properties: hibernate: - show_sql: true + show_sql: false format_sql: true use_sql_comments: true devtools: diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 5f10942..64bf7dd 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -15,17 +15,6 @@ - - ${LOG_PATH}/hibernate.log - - ${LOG_PATH}/hibernate.%d{yyyy-MM-dd}.log - 7 - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n - - - ${CONSOLE_PATTERN} @@ -48,9 +37,33 @@ + + + ${LOG_PATH}/hibernate.log + + ${LOG_PATH}/hibernate.%d{yyyy-MM-dd}.log + 7 + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n + + + + + ${LOG_PATH}/portal.log + + ${LOG_PATH}/portal.%d{yyyy-MM-dd}.log + 7 + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n + + + + @@ -74,6 +87,7 @@ +