Initial commit
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
#TODO zufaellige Ports eintragen
|
||||
server.port: 12000
|
||||
grpc.server.port: 12002
|
||||
management.server.port: 12001
|
||||
|
||||
de.twomartens.template.name: "Template"
|
||||
@@ -0,0 +1,67 @@
|
||||
server:
|
||||
port: 8080
|
||||
shutdown: graceful
|
||||
grpc.server.port: 9090
|
||||
|
||||
### technical configurations ###
|
||||
management:
|
||||
# for security, don't use same port as application
|
||||
server.port: 8081
|
||||
health:
|
||||
livenessState.enabled: true
|
||||
readinessState.enabled: true
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
probes.enabled: true
|
||||
group:
|
||||
readiness.include: readinessState,diskSpace,grpcChannel,grpc,rest
|
||||
liveness.include: livenessState
|
||||
endpoints.web.exposure.include: '*'
|
||||
# activate percentiles for web and grpc requests
|
||||
metrics.distribution.percentiles-histogram:
|
||||
grpc.server.processing.duration: true
|
||||
http.server.requests: true
|
||||
|
||||
spring:
|
||||
main:
|
||||
banner-mode: off
|
||||
profiles:
|
||||
default: dev
|
||||
|
||||
# properties for application
|
||||
de.twomartens.template:
|
||||
defaultTimeZone: Europe/Berlin
|
||||
greeting: "Hello %s"
|
||||
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
path: '/template/doc/'
|
||||
api-docs:
|
||||
path: '/template/api-docs/'
|
||||
default-produces-media-type: 'application/json'
|
||||
|
||||
openapi:
|
||||
#TODO write description/ changelog
|
||||
description: |
|
||||
Open API Documentation for the Template
|
||||
|
||||
## Header 2
|
||||
|
||||
__YOUR TEXT HERE__
|
||||
|
||||
## Changelog
|
||||
|
||||
|Version | Change | Author | Date |
|
||||
| ------ | -------------------------------------- | ------ | ---------- |
|
||||
| 1.0 | added API Versioning (and changelog) | Jim | 28.05.2023 |
|
||||
|
||||
version: 1.0
|
||||
title: 'Template API'
|
||||
|
||||
resttemplate:
|
||||
timeout:
|
||||
readTimeoutRestHealthIndicatorInMillis: 5000
|
||||
connectionRestHealthIndicatorTimeoutInMillis: 5000
|
||||
readTimeoutRestTemplateInMillis: 5000
|
||||
connectionRestTemplateTimeoutInMillis: 5000
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Configuration status="warn" monitorInterval="30">
|
||||
<Appenders>
|
||||
<Console name="console" target="SYSTEM_OUT">
|
||||
<PatternLayout alwaysWriteExceptions="true"
|
||||
pattern="%5p %d{HH:mm:ss.SSS} (%F:%L) %notEmpty{[%X{REQTYPE}] }%notEmpty{[%marker] }%K{event.end}%m%n%xEx{full}"/>
|
||||
</Console>
|
||||
<Console name="interceptor" target="SYSTEM_OUT">
|
||||
<!-- <EcsLayout servicename="${env:spring_application_name}" includeOrigin="true" includeMarkers="true"/>-->
|
||||
<PatternLayout alwaysWriteExceptions="true"
|
||||
pattern="%5p %d{HH:mm:ss.SSS} (%F:%L) %notEmpty{[%K{REQTYPE}] }%notEmpty{[%X{REQTYPE}] }%K{network.direction} %K{http.request.method} %K{http.response.status_code} %K{url.full} (duration=%K{event.duration} request-size=%K{http.request.body.bytes} response-size=%K{http.response.body.bytes} trace-id=%notEmpty{%K{trace.id}}%notEmpty{%X{trace.id}})%n%xEx{full}"/>
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="WARN">
|
||||
<AppenderRef ref="console"/>
|
||||
</Root>
|
||||
<Logger additivity="true" level="INFO" name="statusprobe"/>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
@@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
|
||||
<th:block th:insert="~{errorIncludes :: head}"/>
|
||||
<body>
|
||||
<th:block th:insert="~{errorIncludes :: mainText}"/>
|
||||
<th:block th:insert="~{errorIncludes :: footer}"/>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
|
||||
<th:block th:insert="~{errorIncludes :: head}" />
|
||||
<body>
|
||||
<th:block th:insert="~{errorIncludes :: mainText}" />
|
||||
<p>The requested URL <code th:text="${path}"></code> was not found on this server.</p>
|
||||
<th:block th:insert="~{errorIncludes :: footer}" />
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:fragment="head">
|
||||
<title>Error <th:block th:text="${status}"/> (<th:block th:text="${error}"/>)</title>
|
||||
<style>
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html{background:#000000;color:#ffffff;font:15px/22px arial,sans-serif}
|
||||
}
|
||||
@media (prefers-color-scheme: light) {
|
||||
html{background:#ffffff;color:#000000;font:15px/22px arial,sans-serif}
|
||||
}
|
||||
body{margin:50px}
|
||||
h1,footer{margin:20px 0}
|
||||
p{margin:0}
|
||||
code{font-family: monospace,monospace}
|
||||
.foot{color:#777777;font-size:80%}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<th:block th:fragment="mainText">
|
||||
<h1>Template</h1>
|
||||
<p>
|
||||
<b th:text="${status}"></b> <th:block th:text="${error}" />
|
||||
</p>
|
||||
</th:block>
|
||||
<footer class="foot" th:fragment="footer"><th:block th:text="${footerString}" /></footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:fragment="head">
|
||||
<title><th:block th:text="${version}"/></title>
|
||||
<style>
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html{background:#000000;color:#ffffff;font:15px/22px arial,sans-serif}
|
||||
}
|
||||
@media (prefers-color-scheme: light) {
|
||||
html{background:#ffffff;color:#000000;font:15px/22px arial,sans-serif}
|
||||
}
|
||||
body{margin:50px}
|
||||
h1,footer{margin:20px 0}
|
||||
p{margin:0}
|
||||
code{font-family: monospace,monospace}
|
||||
.foot{color:#777777;font-size:80%}
|
||||
</style>
|
||||
</head>
|
||||
<body style="font-family:sans-serif; line-height: 1.4em;">
|
||||
<h2>
|
||||
<th:block th:text="${version}"/>
|
||||
</h2>
|
||||
<p>
|
||||
Hostname:
|
||||
<th:block th:text="${hostname}"/>
|
||||
</p>
|
||||
<p>
|
||||
<th:block th:each="item : ${manifest}">
|
||||
<th:block th:text="${item}"/>
|
||||
<br/>
|
||||
</th:block>
|
||||
</p>
|
||||
<footer class="foot" th:fragment="footer">
|
||||
<th:block th:text="${footerString}"/>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user