shjung 1 年之前
父節點
當前提交
c3a38d78c7

+ 1 - 0
conf/sig-comm-server.pid

@@ -0,0 +1 @@
+17356

+ 1 - 1
src/main/java/com/sig/app/common/xnet/NettyServerConfig.java

@@ -28,7 +28,7 @@ public abstract class NettyServerConfig {
         final int DEFAULT_EVENT_THREADS  = Runtime.getRuntime().availableProcessors() * 2;
 
 
-        if (this.bindingAddr.equals("")) {
+        if (this.bindingAddr.isEmpty()) {
             this.bindingAddr = "0.0.0.0";
         }
         if (this.backlog == 0) {

+ 10 - 7
src/main/java/com/sig/app/common/xnet/NettyTcpServer.java

@@ -38,14 +38,17 @@ public abstract class NettyTcpServer {
             this.serverBootstrap = ServerBootstrapFactory.createBootstrap(this.config, this.channelInitializer);
 
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error("run exception: {}", e.toString());
         }
 
-        log.info("  bindAddress: {}", this.config.getBindingAddr());
-        log.info("     bindPort: {}", this.config.getBindingPort());
-        log.info("      backlog: {}", this.config.getBacklog());
-        log.info("acceptThreads: {}", this.config.getAcceptThreads());
-        log.info("workerThreads: {}", this.config.getWorkerThreads());
+        log.info("================================================");
+        log.info("          bindAddress: {}", this.config.getBindingAddr());
+        log.info("             bindPort: {}", this.config.getBindingPort());
+        log.info("              backlog: {}", this.config.getBacklog());
+        log.info("        acceptThreads: {}", this.config.getAcceptThreads());
+        log.info("        workerThreads: {}", this.config.getWorkerThreads());
+        log.info("readerIdleTimeSeconds: {}", this.config.getReaderIdleTimeSeconds());
+        log.info("================================================");
 
         try {
             if (this.config.getBindingAddr().equals("0.0.0.0")) {
@@ -70,7 +73,7 @@ public abstract class NettyTcpServer {
         }
         catch (InterruptedException e) {
             log.error("{}", e.toString());
-            e.printStackTrace();
+            Thread.currentThread().interrupt();
         }
     }
 }

+ 3 - 2
src/main/java/com/sig/comm/server/SigCommServerApplication.java

@@ -28,12 +28,12 @@ import java.util.Date;
 @ComponentScan(basePackages = {"com.sig.app.common", "com.sig.comm.server.config", "com.sig.comm.server"})
 public class SigCommServerApplication implements CommandLineRunner, ApplicationListener<ContextClosedEvent>, InitializingBean, DisposableBean {
 
-    private static String applicationName = "tsi-comm-server";
+    private static final String APPLICATION_NAME = "sig-comm-server";
 
     public static void main(String[] args) {
         SpringApplication application = new SpringApplicationBuilder()
                 .sources(SigCommServerApplication.class)
-                .listeners(new ApplicationPidFileWriter("./conf/" + applicationName + ".pid"))
+                .listeners(new ApplicationPidFileWriter("./conf/" + APPLICATION_NAME + ".pid"))
                 .build();
         application.setBannerMode(Banner.Mode.OFF);
         application.run(args);
@@ -61,6 +61,7 @@ public class SigCommServerApplication implements CommandLineRunner, ApplicationL
         sigCommServerService.updateCtlrStts(true, null);
 
         TsiSessionManager.getInstance().start();
+
         SigTcpCommServerService sigTcpCommServerService = (SigTcpCommServerService)AppUtils.getBean(SigTcpCommServerService.class);
         sigTcpCommServerService.run();
 

+ 41 - 0
src/main/java/com/sig/comm/server/common/SpringUtils.java

@@ -0,0 +1,41 @@
+package com.sig.comm.server.common;
+
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Component;
+
+@Component
+public class SpringUtils implements ApplicationContextAware {
+    private static ApplicationContext _applicationContext;
+    private static String _applicationId;
+    private static Environment _environment;
+
+    @Override
+    public void setApplicationContext(ApplicationContext ctx) throws BeansException {
+        _applicationContext = ctx;
+        _applicationId = ctx.getId();
+        _environment = ctx.getEnvironment();
+    }
+
+    public static ApplicationContext getApplicationContext() {
+        return _applicationContext;
+    }
+
+    public static Object getBean(String name){
+        return getApplicationContext().getBean(name);
+    }
+
+    public static <T> T getBean(Class<T> clazz){
+        return getApplicationContext().getBean(clazz);
+    }
+
+    public static <T> T getBean(String name, Class<T> clazz){
+        return getApplicationContext().getBean(name, clazz);
+    }
+
+    public static String[] getAllDefinitionBeanName() {
+        return getApplicationContext().getBeanDefinitionNames();
+    }
+}

+ 1 - 0
src/main/java/com/sig/comm/server/config/ApplicationConfig.java

@@ -50,6 +50,7 @@ public class ApplicationConfig extends NettyServerConfig {
         log.info("[{}]         loggingThread: {}", this.getClass().getSimpleName(), this.loggingThread);
         log.info("[{}]         packetWorkers: {}", this.getClass().getSimpleName(), this.packetWorkers);
         log.info("[{}]        loggingWorkers: {}", this.getClass().getSimpleName(), this.loggingWorkers);
+        log.info("[{}] readerIdleTimeSeconds: {}", this.getClass().getSimpleName(), this.readerIdleTimeSeconds);
         log.info("{}", super.toString());
     }
 

+ 18 - 18
src/main/java/com/sig/comm/server/entity/TbRegionCenter.java

@@ -16,18 +16,18 @@ public class TbRegionCenter implements Serializable {
     private static final long serialVersionUID = 1L;
 
     private String regionCd;        /* 지역 코드 */
-    private String regionNm;       /* 지역 명 */
-    private String ipAddress;      /* IP Address */
-    private String loginId;        /* 지역센터 아이디 */
-    private String loginPswd;      /* 지역센터 비밀번호 */
-    private String fileUpdDt;     /* 파일 수정일자 */
-    private String simulateFlag;         /* 시뮬레이터 여부 */
-    private int regionId;             /* 지역 ID */
+    private String regionNm;        /* 지역 명 */
+    private String ipAddress;       /* IP Address */
+    private String loginId;         /* 지역센터 아이디 */
+    private String loginPswd;       /* 지역센터 비밀번호 */
+    private String fileUpdDt;       /* 파일 수정일자 */
+    private String simulateFlag;    /* 시뮬레이터 여부 */
+    private int regionId;           /* 지역 ID */
 
-    private String extYn;             /* 민간연계여부(N;연계안함,Y:연계) */
-    private String realtimeYn;        /* 실시간정보 연계여부(N;연계안함,Y:연계) */
-    private String dbaseYn;           /* TOD기반정보 연계여부(N;연계안함,Y:연계) */
-    private String commHistYn;       /* TB_COMM_HIST 저장여부(N;저장안함,Y:저장) */
+    private String extYn;           /* 민간 연계여부(N;연계안함,Y:연계) */
+    private String realtimeYn;      /* 실시간정보 연계여부(N;연계안함,Y:연계) */
+    private String dbaseYn;         /* TOD기반정보 연계여부(N;연계안함,Y:연계) */
+    private String commHistYn;      /* TB_COMM_HIST 저장여부(N;저장안함,Y:저장) */
 
     private int minIntNo;
     private int maxIntNo;
@@ -35,13 +35,13 @@ public class TbRegionCenter implements Serializable {
 
     public RegionCenterDto toDto() {
         return RegionCenterDto.builder()
-                .regionCd(this.regionCd)
-                .regionNm(this.regionNm)
-                .ipAddress(this.ipAddress)
-                .loginId(this.loginId)
-                .loginPswd(this.loginPswd)
-                .fileUpdDt(this.fileUpdDt)
-                .simulateFlag(this.simulateFlag)
+                .regionCd(this.regionCd.trim())
+                .regionNm(this.regionNm.trim())
+                .ipAddress(this.ipAddress.trim())
+                .loginId(this.loginId.trim())
+                .loginPswd(this.loginPswd.trim())
+                .fileUpdDt(this.fileUpdDt.trim())
+                .simulateFlag(this.simulateFlag.trim())
                 .regionId(this.regionId)
                 .extYn(this.extYn)
                 .realtimeYn(this.realtimeYn)

+ 6 - 19
src/main/java/com/sig/comm/server/tcp/SigTcpCommServerService.java

@@ -1,51 +1,38 @@
 package com.sig.comm.server.tcp;
 
-import com.sig.app.common.app.AppUtils;
 import com.sig.app.common.utils.OS;
 import com.sig.app.common.xnet.NettyTcpServer;
 import com.sig.app.common.xnet.NettyUtils;
 import com.sig.comm.server.config.ApplicationConfig;
-import com.sig.comm.server.tcp.codec.SigRecvByteBufMessageDecoder;
-import com.sig.comm.server.tcp.codec.SigSendByteBufMessageEncoder;
-import com.sig.comm.server.tcp.handler.SigServerInboundMessageHandler;
 import com.sig.comm.server.tcp.initializer.SigCommServerInitializer;
 import io.netty.channel.epoll.Epoll;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.PostConstruct;
 
+@Slf4j
 @Service
 public class SigTcpCommServerService extends NettyTcpServer {
 
     private final ApplicationConfig config;
-    private SigRecvByteBufMessageDecoder sigRecvByteBufMessageDecoder;
-    private SigServerInboundMessageHandler sigServerInboundMessageHandler;
-    private SigSendByteBufMessageEncoder sigSendByteBufMessageEncoder;
-
     public SigTcpCommServerService(ApplicationConfig config) {
         super(config);
 
         this.config = config;
-        this.sigRecvByteBufMessageDecoder = (SigRecvByteBufMessageDecoder) AppUtils.getBean(SigRecvByteBufMessageDecoder.class);
-        this.sigServerInboundMessageHandler = (SigServerInboundMessageHandler)AppUtils.getBean(SigServerInboundMessageHandler.class);
-        this.sigSendByteBufMessageEncoder = (SigSendByteBufMessageEncoder) AppUtils.getBean(SigSendByteBufMessageEncoder.class);
     }
 
     @PostConstruct
     public void initialize() {
-        //CvimServerIdleHandler cvimServerIdleHandler = new CvimServerIdleHandler(config.getReaderIdleTimeSeconds(), config.getWriterIdleTimeSeconds(), config.getAllIdleTimeSeconds(), config);
         super.setChannelInitializer(new SigCommServerInitializer(this.config));
-        //super.setChannelInitializer(new CvimServerInitializer(cvimServerIdleHandler, cvimServerByteBufMessageDecoder, cvimServerInboundMessageHandler, cvimServerEncoder));
-        if (!OS.isWindows()) {
-            if (!Epoll.isAvailable()) {
-                Epoll.unavailabilityCause().printStackTrace();
-            }
+        if (!OS.isWindows() && (!Epoll.isAvailable())) {
+            log.warn("SigTcpCommServerService.initialize: {}", Epoll.unavailabilityCause().toString());
         }
         if (NettyUtils.isEpollAvailable()) {
-            System.out.println("서버가 리눅스 EPOLL 모드에서 실행됩니다.");
+            log.info("서버가 리눅스 EPOLL 모드에서 실행됩니다.");
         }
         else {
-            System.out.println("서버가 윈도우 NIO 모드에서 실행됩니다.");
+            log.info("서버가 윈도우 NIO 모드에서 실행됩니다.");
         }
     }
 }

+ 2 - 4
src/main/java/com/sig/comm/server/tcp/codec/SigRecvByteBufMessageDecoder.java

@@ -16,17 +16,15 @@ import com.sig.comm.server.vo.TsiAlarmConfigVo;
 import com.sig.comm.server.vo.TsiNodeVo;
 import io.netty.buffer.ByteBuf;
 import io.netty.channel.Channel;
-import io.netty.channel.ChannelHandler;
 import io.netty.channel.ChannelHandlerContext;
 import io.netty.handler.codec.MessageToMessageDecoder;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Component;
 
 import java.util.List;
 
 @Slf4j
-@Component
-@ChannelHandler.Sharable
+//@Component
+//@ChannelHandler.Sharable
 public class SigRecvByteBufMessageDecoder extends MessageToMessageDecoder<ByteBuf> {
 
     private final SigCommPacketProcess tsiCvimPacketService;

+ 62 - 0
src/main/java/com/sig/comm/server/tcp/handler/SigCommReceivePacketHandler.java

@@ -0,0 +1,62 @@
+package com.sig.comm.server.tcp.handler;
+
+import com.sig.app.common.xnet.NettyUtils;
+import io.netty.buffer.ByteBuf;
+import io.netty.channel.ChannelHandler;
+import io.netty.channel.ChannelHandlerContext;
+import io.netty.channel.SimpleChannelInboundHandler;
+import io.netty.handler.timeout.IdleState;
+import io.netty.handler.timeout.IdleStateEvent;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+@Slf4j
+@AllArgsConstructor
+@Component
+@ChannelHandler.Sharable
+public class SigCommReceivePacketHandler extends SimpleChannelInboundHandler<ByteBuf> {
+
+    @Override
+    protected void channelRead0(ChannelHandlerContext channelHandlerContext, ByteBuf byteBuf) throws Exception {
+        log.info("Receive packet: {} Bytes.", byteBuf.readableBytes());
+    }
+
+
+    public void channelActive(ChannelHandlerContext ctx) throws Exception {
+        // session count increment
+        log.info("{}.++channelActive: {}.", this.getClass().getSimpleName(), NettyUtils.getAddress(ctx.channel()));
+        ctx.fireChannelActive();
+    }
+
+    public void channelInactive(ChannelHandlerContext ctx) throws Exception {
+        log.info("{}.++channelInactive: {}.", this.getClass().getSimpleName(), NettyUtils.getAddress(ctx.channel()));
+        ctx.fireChannelInactive();
+    }
+
+    public void userEventTriggered(ChannelHandlerContext ctx, Object e) throws Exception {
+        if (e instanceof IdleStateEvent) {
+            IdleStateEvent evt = (IdleStateEvent) e;
+            log.info("{}.++userEventTriggered: {}. {}", this.getClass().getSimpleName(), NettyUtils.getAddress(ctx.channel()), evt.state());
+
+            // 연결이 완료된 후 송수신 데이터가 일정시간 동안 없을 경우 이곳에서 처리
+            if (evt.state() == IdleState.READER_IDLE) {
+            } else if (evt.state() == IdleState.WRITER_IDLE) {
+                log.error("{}.channelIdle: WRITER_IDLE: {}", this.getClass().getSimpleName(), NettyUtils.getAddress(ctx.channel()));
+            } else if (evt.state() == IdleState.ALL_IDLE) {
+                log.error("{}.channelIdle: ALL_IDLE: {}", this.getClass().getSimpleName(), NettyUtils.getAddress(ctx.channel()));
+            }
+        }
+        else {
+            log.info("{}.++userEventTriggered: {}.", this.getClass().getSimpleName(), NettyUtils.getAddress(ctx.channel()));
+        }
+        ctx.fireUserEventTriggered(e);
+    }
+
+    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
+        log.error("{}.++exceptionCaught: {}.", this.getClass().getSimpleName(), NettyUtils.getAddress(ctx.channel()));
+
+        ctx.fireExceptionCaught(cause);
+        ctx.channel().close();
+    }
+}

+ 3 - 11
src/main/java/com/sig/comm/server/tcp/handler/SigServerInboundMessageHandler.java

@@ -1,11 +1,9 @@
 package com.sig.comm.server.tcp.handler;
 
-import com.sig.app.common.app.AppUtils;
 import com.sig.app.common.xnet.NettyUtils;
 import com.sig.comm.server.dao.vo.AbstractDbmsVo;
 import com.sig.comm.server.dao.vo.AlarmOccrVo;
 import com.sig.comm.server.dao.vo.NodeStatusVo;
-import com.sig.comm.server.process.dbms.DbmsDataProcess;
 import com.sig.comm.server.process.packet.SigCommPacketProcess;
 import com.sig.comm.server.protocol.AbstractTsiPacket;
 import com.sig.comm.server.protocol.TsiCpuDisconnected;
@@ -18,23 +16,17 @@ import io.netty.channel.ChannelHandlerContext;
 import io.netty.channel.ChannelInboundHandlerAdapter;
 import io.netty.handler.timeout.IdleState;
 import io.netty.handler.timeout.IdleStateEvent;
+import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 
 @Slf4j
+@AllArgsConstructor
 @Component
 @ChannelHandler.Sharable
 public class SigServerInboundMessageHandler extends ChannelInboundHandlerAdapter {
 
-    private SigCommPacketProcess sigCommPacketProcess;
-    //private SigDatabaseService tsiNodeService;
-    private DbmsDataProcess tsiCvimDbmsService;
-
-    public SigServerInboundMessageHandler() {
-        this.sigCommPacketProcess = (SigCommPacketProcess)AppUtils.getBean(SigCommPacketProcess.class);
-        //this.tsiNodeService = (SigDatabaseService)AppUtils.getBean(SigDatabaseService.class);
-        this.tsiCvimDbmsService = (DbmsDataProcess) AppUtils.getBean(DbmsDataProcess.class);
-    }
+    private final SigCommPacketProcess sigCommPacketProcess;
 
     public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
         log.error("Handler: channelRead: {}", NettyUtils.getRemoteIpAddress(ctx.channel()));

+ 0 - 30
src/main/java/com/sig/comm/server/tcp/handler/SigServerRegisterHandler.java

@@ -1,30 +0,0 @@
-package com.sig.comm.server.tcp.handler;
-
-import io.netty.channel.ChannelDuplexHandler;
-import io.netty.channel.ChannelHandlerContext;
-import io.netty.handler.timeout.IdleState;
-import io.netty.handler.timeout.IdleStateEvent;
-import lombok.extern.slf4j.Slf4j;
-
-@Slf4j
-//@Component
-//@ChannelHandler.Sharable
-public class SigServerRegisterHandler extends ChannelDuplexHandler {
-    // 사용자는 userEventTriggered 에서 이벤트의 상태를 읽어 필요한 동작을 지정해주면 된다.
-    public SigServerRegisterHandler() {
-        super();
-        log.error("CvimServerRegisterHandler");
-    }
-
-    @Override
-    public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
-        if (evt instanceof IdleStateEvent) {
-            IdleStateEvent e = (IdleStateEvent) evt;
-            log.error("CvimServerRegisterHandler: {}", e.toString());
-            if (e.state() == IdleState.READER_IDLE) {
-                //ctx.close();
-            }
-        }
-        super.userEventTriggered(ctx, evt);
-    }
-}

+ 13 - 13
src/main/java/com/sig/comm/server/tcp/initializer/SigCommServerInitializer.java

@@ -1,48 +1,48 @@
 package com.sig.comm.server.tcp.initializer;
 
 import com.sig.app.common.app.AppUtils;
+import com.sig.comm.server.common.SpringUtils;
 import com.sig.comm.server.config.ApplicationConfig;
-import com.sig.comm.server.tcp.codec.SigRecvByteBufMessageDecoder;
 import com.sig.comm.server.tcp.codec.SigSendByteBufMessageEncoder;
+import com.sig.comm.server.tcp.handler.SigCommReceivePacketHandler;
 import com.sig.comm.server.tcp.handler.SigServerInboundMessageHandler;
 import com.sig.comm.server.tcp.protocol.SigProtocolConst;
 import io.netty.channel.Channel;
 import io.netty.channel.ChannelInitializer;
 import io.netty.channel.ChannelPipeline;
 import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
+import io.netty.handler.logging.LogLevel;
+import io.netty.handler.logging.LoggingHandler;
 import io.netty.handler.timeout.IdleStateHandler;
 
 public class SigCommServerInitializer extends ChannelInitializer<Channel> {
 
-    //private CvimServerIdleHandler cvimServerIdleHandler;
-    private SigRecvByteBufMessageDecoder sigRecvByteBufMessageDecoder;
-    private SigServerInboundMessageHandler sigServerInboundMessageHandler;
-    private SigSendByteBufMessageEncoder sigSendByteBufMessageEncoder;
-    private ApplicationConfig config;
+    private final SigServerInboundMessageHandler sigServerInboundMessageHandler;
+    private final SigCommReceivePacketHandler sigCommReceivePacketHandler;
+    private final SigSendByteBufMessageEncoder sigSendByteBufMessageEncoder;
+    private final ApplicationConfig config;
 
     public SigCommServerInitializer(ApplicationConfig config) {
-        //this.cvimServerIdleHandler = (CvimServerIdleHandler) AppUtils.getBean(CvimServerIdleHandler.class);
-        this.sigRecvByteBufMessageDecoder = (SigRecvByteBufMessageDecoder) AppUtils.getBean(SigRecvByteBufMessageDecoder.class);
+        this.config = config;
         this.sigServerInboundMessageHandler = (SigServerInboundMessageHandler) AppUtils.getBean(SigServerInboundMessageHandler.class);
+        this.sigCommReceivePacketHandler = SpringUtils.getBean(SigCommReceivePacketHandler.class);
         this.sigSendByteBufMessageEncoder = (SigSendByteBufMessageEncoder) AppUtils.getBean(SigSendByteBufMessageEncoder.class);
-        this.config = config;
     }
 
     @Override
     protected void initChannel(Channel channel) throws Exception {
-        //IdleStateHandler idleStateHandler = new IdleStateHandler(this.config.getReaderIdleTimeSeconds(), this.config.getWriterIdleTimeSeconds(), this.config.getAllIdleTimeSeconds());
         IdleStateHandler idleStateHandler = new IdleStateHandler(this.config.getReaderIdleTimeSeconds(), 0, 0);
         ChannelPipeline pipeline = channel.pipeline();
+        pipeline.addLast(new LoggingHandler(LogLevel.INFO));
         pipeline.addLast("idleStateHandler", idleStateHandler);
-        //pipeline.addLast("cvimServerIdleHandler", this.cvimServerIdleHandler);
         pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(
                 SigProtocolConst.SIG_MAX_PACKET,
                 SigProtocolConst.SIG_PACKET_LENGTH_FIELD_OFFSET,    /* 패킷 에서 길이 필드의 시작 위치 */
                 SigProtocolConst.SIG_PACKET_LENGTH_FIELD_SIZE,      /* 길이 필드의 크기 */
                 SigProtocolConst.SIG_PACKET_LENGTH_ADJUSTMENTS,     /* 길이 필드 값에 +-해서 길이 필드 이후의 전체 길이를 구한다 */
                 0));
-        pipeline.addLast("packetDecoder", this.sigRecvByteBufMessageDecoder);
-        pipeline.addLast("packetInboundHandler", this.sigServerInboundMessageHandler);
+//        pipeline.addLast("packetInboundHandler", this.sigServerInboundMessageHandler);
+        pipeline.addLast("packetInboundHandler", this.sigCommReceivePacketHandler);
         pipeline.addLast("frameEncoder", this.sigSendByteBufMessageEncoder);
     }
 }

+ 26 - 23
src/main/resources/application.yml

@@ -1,4 +1,6 @@
 spring:
+  profiles:
+    active: prod
   application:
     name: sig-comm-server
   main:
@@ -59,26 +61,27 @@ application:
 #          descriptor:
 #            sql:
 #              BasicBinder: INFO
-#---
-#spring:
-#  config:
-#    activate:
-#      on-profile: dev
-#  datasource:
-#    hikari:
-#      driver-class-name: oracle.jdbc.OracleDriver
-#      jdbc-url: jdbc:oracle:thin:@115.91.94.42:1521:HANTE
-#      username: siguser
-#      password: siguser
-#
-#---
-#spring:
-#  config:
-#    activate:
-#      on-profile: prod
-#  datasource:
-#    hikari:
-#      driver-class-name: oracle.jdbc.OracleDriver
-#      jdbc-url: jdbc:oracle:thin:@115.91.94.42:1521:HANTE
-#      username: siguser
-#      password: siguser
+
+---
+spring:
+  config:
+    activate:
+      on-profile: dev
+  datasource:
+    hikari:
+      driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
+      jdbc-url: jdbc:log4jdbc:oracle:thin:@115.91.94.42:1521:HANTE
+      username: siguser
+      password: siguser
+
+---
+spring:
+  config:
+    activate:
+      on-profile: prod
+  datasource:
+    hikari:
+      driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
+      jdbc-url: jdbc:log4jdbc:oracle:thin:@192.168.10.68:1521:CVIBDB
+      username: siguser
+      password: siguser