로깅 변경
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.common.user.PortalAuthenticatedUser;
|
||||||
import com.eactive.apim.portal.portalorg.entity.PortalOrgEnums;
|
import com.eactive.apim.portal.portalorg.entity.PortalOrgEnums;
|
||||||
import com.eactive.apim.portal.portaluser.entity.PortalUserEnums;
|
import com.eactive.apim.portal.portaluser.entity.PortalUserEnums;
|
||||||
|
|
||||||
import java.util.Base64;
|
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.security.authentication.*;
|
import org.springframework.security.authentication.*;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
import org.springframework.security.core.AuthenticationException;
|
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.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Base64;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Transactional
|
@Transactional
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
public class PortalAuthenticationManager implements AuthenticationManager {
|
public class PortalAuthenticationManager implements AuthenticationManager {
|
||||||
|
|
||||||
private final PortalUserAuthService portalUserAuthService;
|
private final PortalUserAuthService portalUserAuthService;
|
||||||
@@ -73,7 +74,8 @@ public class PortalAuthenticationManager implements AuthenticationManager {
|
|||||||
|
|
||||||
if (user.getPortalOrg() != null) {
|
if (user.getPortalOrg() != null) {
|
||||||
if (!user.getPortalOrg().getApprovalStatus().equals(PortalOrgEnums.ApprovalStatus.COMPLETED)) {
|
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.");
|
log.error("Profile property 'schema' is empty. Please check your configuration.");
|
||||||
throw new IllegalArgumentException("'ems.datasource.schema' is not configured.");
|
throw new IllegalArgumentException("'ems.datasource.schema' is not configured.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.setProperty("ems.schema", emsDatasourceProperties.getSchema());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Primary
|
@Primary
|
||||||
@@ -126,7 +128,7 @@ public class PortalConfigPortalDatasource {
|
|||||||
properties.put("hibernate.dialect", "org.hibernate.dialect.Oracle12cDialect");
|
properties.put("hibernate.dialect", "org.hibernate.dialect.Oracle12cDialect");
|
||||||
properties.put("hibernate.format_sql", "true");
|
properties.put("hibernate.format_sql", "true");
|
||||||
properties.put("hibernate.physical_naming_strategy", "com.eactive.apim.portal.common.entity.CustomPhysicalNamingStrategy");
|
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.transaction.jta.platform", "org.hibernate.engine.transaction.jta.platform.internal.AtomikosJtaPlatform");
|
||||||
properties.put("hibernate.use_sql_comments", "true");
|
properties.put("hibernate.use_sql_comments", "true");
|
||||||
properties.put("hibernate.default_schema", emsDatasourceProperties.getSchema());
|
properties.put("hibernate.default_schema", emsDatasourceProperties.getSchema());
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ spring:
|
|||||||
jpa:
|
jpa:
|
||||||
properties:
|
properties:
|
||||||
hibernate:
|
hibernate:
|
||||||
show_sql: true
|
show_sql: false
|
||||||
format_sql: true
|
format_sql: true
|
||||||
use_sql_comments: true
|
use_sql_comments: true
|
||||||
devtools:
|
devtools:
|
||||||
|
|||||||
@@ -15,17 +15,6 @@
|
|||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</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">
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
<encoder><Pattern>${CONSOLE_PATTERN}</Pattern></encoder>
|
<encoder><Pattern>${CONSOLE_PATTERN}</Pattern></encoder>
|
||||||
</appender>
|
</appender>
|
||||||
@@ -48,9 +37,33 @@
|
|||||||
</root>
|
</root>
|
||||||
</springProfile>
|
</springProfile>
|
||||||
|
|
||||||
|
|
||||||
<springProfile name="gf63">
|
<springProfile name="gf63">
|
||||||
<property name="LOG_PATH" value="d:/kjb-logs/${inst.Name:-devSvr00}"/>
|
<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="sun.rmi" level="INFO" additivity="false"/>
|
||||||
|
|
||||||
<logger name="javax" 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">
|
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" additivity="false">
|
||||||
<appender-ref ref="HIBERNATE_APPENDER" />
|
<appender-ref ref="HIBERNATE_APPENDER" />
|
||||||
</logger>
|
</logger>
|
||||||
|
<logger name="ccom.eactive.eapim" level="DEBUG" additivity="false"/>
|
||||||
|
|
||||||
|
|
||||||
<root level="INFO">
|
<root level="INFO">
|
||||||
|
|||||||
Reference in New Issue
Block a user