로깅 변경
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -6,7 +6,7 @@ spring:
|
||||
jpa:
|
||||
properties:
|
||||
hibernate:
|
||||
show_sql: true
|
||||
show_sql: false
|
||||
format_sql: true
|
||||
use_sql_comments: true
|
||||
devtools:
|
||||
|
||||
@@ -15,17 +15,6 @@
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="HIBERNATE_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_PATH}/hibernate.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_PATH}/hibernate.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<maxHistory>7</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder><Pattern>${CONSOLE_PATTERN}</Pattern></encoder>
|
||||
</appender>
|
||||
@@ -48,9 +37,33 @@
|
||||
</root>
|
||||
</springProfile>
|
||||
|
||||
|
||||
<springProfile name="gf63">
|
||||
<property name="LOG_PATH" value="d:/kjb-logs/${inst.Name:-devSvr00}"/>
|
||||
|
||||
<appender name="HIBERNATE_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_PATH}/hibernate.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_PATH}/hibernate.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<maxHistory>7</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_PATH}/portal.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_PATH}/portal.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<maxHistory>7</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<logger name="sun.rmi" level="INFO" additivity="false"/>
|
||||
|
||||
<logger name="javax" level="INFO" additivity="false"/>
|
||||
@@ -74,6 +87,7 @@
|
||||
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" additivity="false">
|
||||
<appender-ref ref="HIBERNATE_APPENDER" />
|
||||
</logger>
|
||||
<logger name="ccom.eactive.eapim" level="DEBUG" additivity="false"/>
|
||||
|
||||
|
||||
<root level="INFO">
|
||||
|
||||
Reference in New Issue
Block a user