가상 환경 반영
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.eactive.apim.portal.config;
|
package com.eactive.apim.portal.config;
|
||||||
|
|
||||||
import com.eactive.eai.data.jpa.BaseRepositoryImpl;
|
import com.eactive.eai.data.jpa.BaseRepositoryImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||||
@@ -9,13 +10,16 @@ import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
|
|||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
|
import org.springframework.core.env.Environment;
|
||||||
import org.springframework.data.domain.AuditorAware;
|
import org.springframework.data.domain.AuditorAware;
|
||||||
import org.springframework.data.envers.repository.support.EnversRevisionRepositoryFactoryBean;
|
import org.springframework.data.envers.repository.support.EnversRevisionRepositoryFactoryBean;
|
||||||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
||||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||||
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
@@ -40,14 +44,31 @@ import java.util.Properties;
|
|||||||
repositoryFactoryBeanClass = EnversRevisionRepositoryFactoryBean.class)
|
repositoryFactoryBeanClass = EnversRevisionRepositoryFactoryBean.class)
|
||||||
@EntityScan(basePackages = "com.eactive.apim.portal")
|
@EntityScan(basePackages = "com.eactive.apim.portal")
|
||||||
@EnableJpaAuditing(auditorAwareRef = "auditorProvider")
|
@EnableJpaAuditing(auditorAwareRef = "auditorProvider")
|
||||||
|
@Slf4j
|
||||||
public class PortalConfigPortalDatasource {
|
public class PortalConfigPortalDatasource {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private EmsDatasourceProperties emsDatasourceProperties;
|
private EmsDatasourceProperties emsDatasourceProperties;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
Environment env;
|
||||||
|
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
public void checkProfile() {
|
||||||
|
log.warn("Active profiles: {}", Arrays.toString(env.getActiveProfiles()));
|
||||||
|
}
|
||||||
|
|
||||||
@Primary
|
@Primary
|
||||||
@Bean
|
@Bean
|
||||||
public DataSource portalDataSource() {
|
public DataSource portalDataSource() {
|
||||||
|
log.warn("Datasource - portal configuration");
|
||||||
|
log.warn("serverName : {}", emsDatasourceProperties.getServerName());
|
||||||
|
log.warn("PortNumber : {}", String.valueOf(emsDatasourceProperties.getPortNumber()));
|
||||||
|
log.warn("DatabaseName : {}", emsDatasourceProperties.getDatabaseName());
|
||||||
|
log.warn("Username : {}", emsDatasourceProperties.getUsername());
|
||||||
|
log.warn("Password : {}", emsDatasourceProperties.getPassword());
|
||||||
|
|
||||||
AtomikosDataSourceBean dataSource = new AtomikosDataSourceBean();
|
AtomikosDataSourceBean dataSource = new AtomikosDataSourceBean();
|
||||||
dataSource.setBeanName("portalDataSource");
|
dataSource.setBeanName("portalDataSource");
|
||||||
dataSource.setUniqueResourceName("portalDataSource");
|
dataSource.setUniqueResourceName("portalDataSource");
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
logging:
|
||||||
|
level:
|
||||||
|
web: debug
|
||||||
|
file:
|
||||||
|
name: ./logs/portal.log
|
||||||
|
|
||||||
|
# name: /kbklog/standalone/adp/portal.log
|
||||||
|
spring:
|
||||||
|
jta:
|
||||||
|
enabled: true
|
||||||
|
jpa:
|
||||||
|
properties:
|
||||||
|
hibernate:
|
||||||
|
show_sql: true
|
||||||
|
format_sql: true
|
||||||
|
use_sql_comments: true
|
||||||
|
devtools:
|
||||||
|
restart:
|
||||||
|
enabled: false
|
||||||
|
livereload:
|
||||||
|
enabled: true
|
||||||
|
thymeleaf:
|
||||||
|
cache: false
|
||||||
|
|
||||||
|
ems:
|
||||||
|
datasource:
|
||||||
|
serverName: 192.168.240.177
|
||||||
|
portNumber: 3306
|
||||||
|
databaseName: apims
|
||||||
|
username: apims
|
||||||
|
password: apims
|
||||||
|
|
||||||
|
# serverName: 172.20.160.59
|
||||||
|
# portNumber: 3317
|
||||||
|
# databaseName: ndapims
|
||||||
|
# username: api_app
|
||||||
|
# password: Tapiapp*17
|
||||||
|
|
||||||
|
gateway:
|
||||||
|
datasource:
|
||||||
|
serverName: 192.168.240.177
|
||||||
|
portNumber: 3306
|
||||||
|
databaseName: apims
|
||||||
|
username: apims
|
||||||
|
password: apims
|
||||||
|
|
||||||
|
# serverName: 172.20.160.59
|
||||||
|
# portNumber: 3317
|
||||||
|
# databaseName: ndapigw
|
||||||
|
# username: api_app
|
||||||
|
# password: Tapiapp*17
|
||||||
|
|
||||||
|
|
||||||
|
proxy:
|
||||||
|
targets:
|
||||||
|
stg: http://localhost:10000/monitoring
|
||||||
|
prod: http://localhost:10000/monitoring
|
||||||
|
|
||||||
|
# stg: http://inter-ndapiap01.k-bank.com:7090/monitoring
|
||||||
|
# prod: http://inter-ndapiap01.k-bank.com:7090/monitoring
|
||||||
|
timeout:
|
||||||
|
connect: 5000
|
||||||
|
read: 5000
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
logging:
|
||||||
|
level:
|
||||||
|
web: debug
|
||||||
|
file:
|
||||||
|
name: ./logs/portal.log
|
||||||
|
|
||||||
|
# name: /kbklog/standalone/adp/portal.log
|
||||||
|
spring:
|
||||||
|
jta:
|
||||||
|
enabled: true
|
||||||
|
jpa:
|
||||||
|
properties:
|
||||||
|
hibernate:
|
||||||
|
show_sql: true
|
||||||
|
format_sql: true
|
||||||
|
use_sql_comments: true
|
||||||
|
devtools:
|
||||||
|
restart:
|
||||||
|
enabled: false
|
||||||
|
livereload:
|
||||||
|
enabled: true
|
||||||
|
thymeleaf:
|
||||||
|
cache: false
|
||||||
|
|
||||||
|
ems:
|
||||||
|
datasource:
|
||||||
|
serverName: localhost
|
||||||
|
portNumber: 3306
|
||||||
|
databaseName: ndapims
|
||||||
|
username: api_app
|
||||||
|
password: from2408!@
|
||||||
|
|
||||||
|
# serverName: 172.20.160.59
|
||||||
|
# portNumber: 3317
|
||||||
|
# databaseName: ndapims
|
||||||
|
# username: api_app
|
||||||
|
# password: Tapiapp*17
|
||||||
|
|
||||||
|
gateway:
|
||||||
|
datasource:
|
||||||
|
serverName: localhost
|
||||||
|
portNumber: 3306
|
||||||
|
databaseName: ndapigw
|
||||||
|
username: api_app
|
||||||
|
password: from2408!@
|
||||||
|
|
||||||
|
# serverName: 172.20.160.59
|
||||||
|
# portNumber: 3317
|
||||||
|
# databaseName: ndapigw
|
||||||
|
# username: api_app
|
||||||
|
# password: Tapiapp*17
|
||||||
|
|
||||||
|
|
||||||
|
proxy:
|
||||||
|
targets:
|
||||||
|
stg: http://localhost:10000/monitoring
|
||||||
|
prod: http://localhost:10000/monitoring
|
||||||
|
|
||||||
|
# stg: http://inter-ndapiap01.k-bank.com:7090/monitoring
|
||||||
|
# prod: http://inter-ndapiap01.k-bank.com:7090/monitoring
|
||||||
|
timeout:
|
||||||
|
connect: 5000
|
||||||
|
read: 5000
|
||||||
@@ -6,9 +6,6 @@ logging:
|
|||||||
spring:
|
spring:
|
||||||
jta:
|
jta:
|
||||||
enabled: true
|
enabled: true
|
||||||
config:
|
|
||||||
activate:
|
|
||||||
on-profile: stage
|
|
||||||
jpa:
|
jpa:
|
||||||
properties:
|
properties:
|
||||||
hibernate:
|
hibernate:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
root: warn
|
root: info
|
||||||
|
|
||||||
server:
|
server:
|
||||||
servlet:
|
servlet:
|
||||||
|
|||||||
Reference in New Issue
Block a user