aboutsummaryrefslogtreecommitdiffstats
path: root/datafile-app-server/src/main/resources
diff options
context:
space:
mode:
authorelinuxhenrik <henrik.b.andersson@est.tech>2018-08-17 12:34:58 +0200
committerelinuxhenrik <henrik.b.andersson@est.tech>2018-08-20 10:43:58 +0200
commitd661dbcf431f0f02ecf98f748e3516ba0ab23dff (patch)
treeeae40a0aa43e2f4c0b718ac181d7aec462f00697 /datafile-app-server/src/main/resources
parent604024401a3f7b142880970b06d91888086feac7 (diff)
Add seed code.
First version based on PRH micro service. Change-Id: Iea1673a8a1961006b1ea98ef245e213e3652eb82 Issue-ID: DCAEGEN2-638 Signed-off-by: elinuxhenrik <henrik.b.andersson@est.tech>
Diffstat (limited to 'datafile-app-server/src/main/resources')
-rw-r--r--datafile-app-server/src/main/resources/application.properties14
-rw-r--r--datafile-app-server/src/main/resources/keystore.jksbin0 -> 2643 bytes
-rw-r--r--datafile-app-server/src/main/resources/keystore.jks.oldbin0 -> 2272 bytes
-rw-r--r--datafile-app-server/src/main/resources/logback-spring.xml47
-rw-r--r--datafile-app-server/src/main/resources/scheduled-context.xml16
5 files changed, 77 insertions, 0 deletions
diff --git a/datafile-app-server/src/main/resources/application.properties b/datafile-app-server/src/main/resources/application.properties
new file mode 100644
index 00000000..205b6caa
--- /dev/null
+++ b/datafile-app-server/src/main/resources/application.properties
@@ -0,0 +1,14 @@
+spring.profiles.active=prod
+spring.main.web-application-type=none
+server.port=8433
+server.ssl.key-store-type=PKCS12
+server.ssl.key-store-password=nokiapnf
+server.ssl.key-store=classpath:keystore.jks
+server.ssl.key-password=nokiapnf
+server.ssl.key-alias=tomcat-localhost
+logging.level.root=ERROR
+logging.level.org.springframework=ERROR
+logging.level.org.springframework.data=ERROR
+logging.level.org.onap.dcaegen2.collectors.datafile=INFO
+logging.file=logs/log/application.log
+app.filepath=config/datafile_endpoints.json
diff --git a/datafile-app-server/src/main/resources/keystore.jks b/datafile-app-server/src/main/resources/keystore.jks
new file mode 100644
index 00000000..cd27cc01
--- /dev/null
+++ b/datafile-app-server/src/main/resources/keystore.jks
Binary files differ
diff --git a/datafile-app-server/src/main/resources/keystore.jks.old b/datafile-app-server/src/main/resources/keystore.jks.old
new file mode 100644
index 00000000..8a2b4f99
--- /dev/null
+++ b/datafile-app-server/src/main/resources/keystore.jks.old
Binary files differ
diff --git a/datafile-app-server/src/main/resources/logback-spring.xml b/datafile-app-server/src/main/resources/logback-spring.xml
new file mode 100644
index 00000000..925b38cc
--- /dev/null
+++ b/datafile-app-server/src/main/resources/logback-spring.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
+ <property name="LOG_FILE"
+ value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}spring.log}"/>
+
+ <springProfile name="dev">
+ <include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
+ <appender name="ROLLING-FILE"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <encoder>
+ <pattern>${FILE_LOG_PATTERN}</pattern>
+ </encoder>
+ <file>${LOG_FILE}</file>
+ <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
+ </rollingPolicy>
+ </appender>
+ <root level="ERROR">
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="ROLLING-FILE"/>
+ </root>
+ </springProfile>
+
+ <springProfile name="prod">
+ <appender name="ROLLING-FILE"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <encoder>
+ <pattern>${FILE_LOG_PATTERN}</pattern>
+ </encoder>
+ <file>${LOG_FILE}</file>
+ <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz</fileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
+ </rollingPolicy>
+ </appender>
+
+ <root level="ERROR">
+ <appender-ref ref="ROLLING-FILE"/>
+ </root>
+ </springProfile>
+</configuration> \ No newline at end of file
diff --git a/datafile-app-server/src/main/resources/scheduled-context.xml b/datafile-app-server/src/main/resources/scheduled-context.xml
new file mode 100644
index 00000000..369d2c7b
--- /dev/null
+++ b/datafile-app-server/src/main/resources/scheduled-context.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:task="http://www.springframework.org/schema/task"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.0.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
+
+ <context:component-scan
+ base-package="org.onap.dcaegen2.collectors.datafile"/>
+ <task:scheduled-tasks>
+ <task:scheduled ref="scheduleController" method="startTasks"
+ fixed-rate="1000"/>
+ </task:scheduled-tasks>
+</beans>