가상 환경 반영
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.eactive.apim.portal.config;
|
||||
|
||||
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.Qualifier;
|
||||
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.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.data.domain.AuditorAware;
|
||||
import org.springframework.data.envers.repository.support.EnversRevisionRepositoryFactoryBean;
|
||||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.sql.DataSource;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Properties;
|
||||
|
||||
@@ -40,14 +44,31 @@ import java.util.Properties;
|
||||
repositoryFactoryBeanClass = EnversRevisionRepositoryFactoryBean.class)
|
||||
@EntityScan(basePackages = "com.eactive.apim.portal")
|
||||
@EnableJpaAuditing(auditorAwareRef = "auditorProvider")
|
||||
@Slf4j
|
||||
public class PortalConfigPortalDatasource {
|
||||
|
||||
@Autowired
|
||||
private EmsDatasourceProperties emsDatasourceProperties;
|
||||
|
||||
@Autowired
|
||||
Environment env;
|
||||
|
||||
|
||||
@PostConstruct
|
||||
public void checkProfile() {
|
||||
log.warn("Active profiles: {}", Arrays.toString(env.getActiveProfiles()));
|
||||
}
|
||||
|
||||
@Primary
|
||||
@Bean
|
||||
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();
|
||||
dataSource.setBeanName("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:
|
||||
jta:
|
||||
enabled: true
|
||||
config:
|
||||
activate:
|
||||
on-profile: stage
|
||||
jpa:
|
||||
properties:
|
||||
hibernate:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
logging:
|
||||
level:
|
||||
root: warn
|
||||
root: info
|
||||
|
||||
server:
|
||||
servlet:
|
||||
|
||||
Reference in New Issue
Block a user