Springboot - s50600822/Notes GitHub Wiki

https://central.sonatype.com/artifact/org.springframework.boot/spring-boot-starter-parent/2.6.7?smo=true

https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-dependency-versions.html

https://github.com/spring-projects/spring-framework/blob/main/spring-core/src/main/java/org/springframework/core/env/SystemEnvironmentPropertySource.java https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/ https://gobyexample.com/environment-variables

Netty Server metric

import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory
import org.springframework.boot.web.embedded.netty.NettyServerCustomizer
import org.springframework.boot.web.server.WebServerFactoryCustomizer
import org.springframework.context.annotation.Bean
import org.springframework.stereotype.Component
import reactor.netty.http.server.HttpServer

@Bean
fun serverFactoryCustomizer(): WebServerFactoryCustomizer<NettyReactiveWebServerFactory> {
    return NettyCustomizer()
}


@Component
class NettyCustomizer : WebServerFactoryCustomizer<NettyReactiveWebServerFactory> {
    override fun customize(factory: NettyReactiveWebServerFactory) {
        factory.addServerCustomizers(NettyServerCustomizer { httpServer: HttpServer ->
            httpServer.metrics(true) { x -> x }
        })
    }
}