Set up project structure

This commit is contained in:
2025-09-09 10:01:14 +02:00
commit b49a78469f
19 changed files with 678 additions and 0 deletions

View 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)
}

View 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>

View File

@@ -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."
}
]
}

View 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

View 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}

View File

@@ -0,0 +1,11 @@
package ltd.lulz.service
import org.junit.jupiter.api.Test
class ApplicationTest {
@Test
fun contextLoads() {
// placeholder
}
}