Set up project structure
This commit is contained in:
11
src/main/kotlin/ltd/hlaeja/Application.kt
Normal file
11
src/main/kotlin/ltd/hlaeja/Application.kt
Normal file
@@ -0,0 +1,11 @@
|
||||
package ltd.hlaeja
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.runApplication
|
||||
|
||||
@SpringBootApplication
|
||||
class Application
|
||||
|
||||
fun main(vararg args: String) {
|
||||
runApplication<Application>(*args)
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"properties": [
|
||||
{
|
||||
"name": "spring.application.version",
|
||||
"type": "java.lang.String",
|
||||
"description": "Application version."
|
||||
},
|
||||
{
|
||||
"name": "spring.application.build.time",
|
||||
"type": "java.lang.String",
|
||||
"description": "Application build time."
|
||||
},
|
||||
{
|
||||
"name": "spring.application.build.os.name",
|
||||
"type": "java.lang.String",
|
||||
"description": "Application build os name."
|
||||
},
|
||||
{
|
||||
"name": "spring.application.build.os.version",
|
||||
"type": "java.lang.String",
|
||||
"description": "Application build os version."
|
||||
}
|
||||
]
|
||||
}
|
||||
38
src/main/resources/application.yml
Normal file
38
src/main/resources/application.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: development
|
||||
application:
|
||||
name: "%APP_NAME%"
|
||||
version: "%APP_VERSION%"
|
||||
build:
|
||||
time: "%APP_BUILD_TIME%"
|
||||
os:
|
||||
name: "%APP_BUILD_OS_NAME%"
|
||||
version: "%APP_BUILD_OS_VERSION%"
|
||||
|
||||
---
|
||||
###############################
|
||||
### Development environment ###
|
||||
###############################
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: development
|
||||
|
||||
---
|
||||
##########################
|
||||
### Docker environment ###
|
||||
##########################
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: docker
|
||||
|
||||
---
|
||||
##############################
|
||||
### Production environment ###
|
||||
##############################
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: production
|
||||
13
src/main/resources/banner.txt
Normal file
13
src/main/resources/banner.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
_/ _/ _/ _/ _/_/_/ _/
|
||||
_/ _/ _/ _/_/_/ _/_/ _/_/_/ _/ _/_/ _/ _/_/ _/ _/ _/_/_/ _/_/
|
||||
_/_/_/_/ _/ _/ _/_/_/_/_/ _/ _/ _/ _/_/ _/_/_/_/ _/_/ _/ _/ _/ _/ _/_/_/_/
|
||||
_/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
|
||||
_/ _/ _/ _/_/_/ _/_/_/ _/ _/_/_/ _/_/_/ _/_/_/ _/ _/ _/ _/_/_/ _/_/_/
|
||||
_/
|
||||
_/
|
||||
|
||||
:: Service :: ${spring.application.name}
|
||||
:: Version :: ${spring.application.version}
|
||||
:: Build time :: ${spring.application.build.time}
|
||||
:: Build OS :: ${spring.application.build.os.name} v${spring.application.build.os.version}
|
||||
11
src/main/resources/logback-test.xml
Normal file
11
src/main/resources/logback-test.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<configuration>
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</root>
|
||||
<logger level="DEBUG" name="ltd.hlaeja"/>
|
||||
</configuration>
|
||||
13
src/main/resources/logback.xml
Normal file
13
src/main/resources/logback.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<configuration>
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</root>
|
||||
<springProfile name="develop|docker">
|
||||
<logger level="DEBUG" name="ltd.hlaeja"/>
|
||||
</springProfile>
|
||||
</configuration>
|
||||
13
src/test/kotlin/ltd/hlaeja/ApplicationTests.kt
Normal file
13
src/test/kotlin/ltd/hlaeja/ApplicationTests.kt
Normal file
@@ -0,0 +1,13 @@
|
||||
package ltd.hlaeja
|
||||
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.springframework.boot.test.context.SpringBootTest
|
||||
|
||||
@SpringBootTest
|
||||
class ApplicationTests {
|
||||
|
||||
@Test
|
||||
fun contextLoads() {
|
||||
// place holder
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user