Set up project structure
This commit is contained in:
11
src/main/kotlin/ltd/lulz/Application.kt
Normal file
11
src/main/kotlin/ltd/lulz/Application.kt
Normal file
@@ -0,0 +1,11 @@
|
||||
package ltd.lulz
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.runApplication
|
||||
|
||||
@SpringBootApplication
|
||||
class Application
|
||||
|
||||
fun main(vararg args: String) {
|
||||
runApplication<Application>(*args)
|
||||
}
|
||||
16
src/main/resources/ logback-spring.xml
Normal file
16
src/main/resources/ logback-spring.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<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="development">
|
||||
<logger level="TRACE" name="ltd.lulz"/>
|
||||
</springProfile>
|
||||
<springProfile name="docker">
|
||||
<logger level="DEBUG" name="ltd.lulz"/>
|
||||
</springProfile>
|
||||
</configuration>
|
||||
@@ -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."
|
||||
}
|
||||
]
|
||||
}
|
||||
52
src/main/resources/application.yml
Normal file
52
src/main/resources/application.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
spring:
|
||||
application:
|
||||
name: "%APP_NAME%"
|
||||
version: "%APP_VERSION%"
|
||||
build:
|
||||
time: "%APP_BUILD_TIME%"
|
||||
os:
|
||||
name: "%APP_BUILD_OS_NAME%"
|
||||
version: "%APP_BUILD_OS_VERSION%"
|
||||
profiles:
|
||||
active: development
|
||||
|
||||
management:
|
||||
endpoint:
|
||||
health:
|
||||
access: read_only
|
||||
show-details: always
|
||||
info:
|
||||
access: read_only
|
||||
endpoints:
|
||||
access:
|
||||
default: none
|
||||
web:
|
||||
exposure:
|
||||
include: "health,info"
|
||||
|
||||
---
|
||||
###############################
|
||||
### Development environment ###
|
||||
###############################
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: development
|
||||
|
||||
---
|
||||
##########################
|
||||
### Docker environment ###
|
||||
##########################
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: docker
|
||||
|
||||
---
|
||||
##############################
|
||||
### Kubernetes environment ###
|
||||
##############################
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: kubernetes
|
||||
11
src/main/resources/banner.txt
Normal file
11
src/main/resources/banner.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
_| _| _|_|_| _|
|
||||
_| _| _| _| _|_|_|_| _| _|_| _| _|_| _| _| _|_|_| _|_|
|
||||
_| _| _| _| _| _|_| _|_|_|_| _|_| _| _| _| _| _|_|_|_|
|
||||
_| _| _| _| _| _| _| _| _| _| _| _| _|
|
||||
_|_|_|_| _|_|_| _|_|_|_| _|_|_|_| _|_|_| _|_|_| _| _| _| _|_|_| _|_|_|
|
||||
|
||||
:: 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/test/kotlin/ltd/lulz/service/ApplicationTest.kt
Normal file
11
src/test/kotlin/ltd/lulz/service/ApplicationTest.kt
Normal file
@@ -0,0 +1,11 @@
|
||||
package ltd.lulz.service
|
||||
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class ApplicationTest {
|
||||
|
||||
@Test
|
||||
fun contextLoads() {
|
||||
// placeholder
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user