This repository demonstrates how Kotlin can simplify Spring Boot configuration properties file mapping

Overview

Kotlin spring-boot nested config props CI

This repository demonstrates how Kotlin can simplify Spring Boot configuration properties file mapping

@ConstructorBinding
@ConfigurationProperties("my.nested.config.props")
data class MyNestedConfigProps(
    val parentField1: String = "undefined",
    val parentField2: String = "undefined",
    val child: Child = Child(),
)

data class Child(
    val childField1: String = "undefined",
    val childField2: String = "undefined",
)

@SpringBootApplication
@EnableConfigurationProperties(MyNestedConfigProps::class)
class MainApp

fun main(args: Array<String>) {
    runApplication<MainApp>(*args)
}

map to next zapplication.properties` file:

my.nested.config.props.parent-filed-1=parent-field-1-value
my.nested.config.props.parent-filed-2=parent-field-2-value
my.nested.config.props.child.child-filed-1=child-field-1-value
my.nested.config.props.child.child-filed-2=child-field-2-value

or to next application.yaml file:

my.nested.config.props:
  parent-field-1: parent-field-1-value
  parent-field-2: parent-field-2-value
  child:
    child-field-1: child-field-1-value
    child-field-2: child-field-2-value
You might also like...
API for a library using Kotlin, Spring-boot and covered by test

Library API This API is to create Books and be able to borrow from them I'm using: Spring Boot version 2.5.6 Kotlin 1.5.31 Java 11 I'm implementing us

Push notification application using One Signal + Spring Boot + Kotlin

Spring Boot push notification system using One Signal This project was created to demonstrate a simple application built with Kotlin + Spring Boot inc

Kotlin Based Spring Boot ETL project
Kotlin Based Spring Boot ETL project

Adverity ETL REST API (AERA) A simple ETL Spring Boot application with H2. This API provides the following basics functionalities: Endpoint that retur

API Rest With Kotlin And Spring Boot

##API REST WITH KOTLIN AND SPRING BOOT GET Url: http://localhost:8080/customers Response (Status Code: 200 Ok) { "_embedded": { "customer

Créer un microservice avec Spring Boot et Kotlin
Créer un microservice avec Spring Boot et Kotlin

🚀 Créer un microservice avec Spring Boot et Kotlin Ce dépôt contient les slides et la démo du talk "créer un microservice avec Spring Boot et Kotlin"

Cloud Bowl Sample - Kotlin Spring Boot

Cloud Bowl Sample - Kotlin Spring Boot To make changes, edit the src/main/kotlin/hello/KotlinApplication.kt file. Run Locally: ./mvnw spring-boot:run

Spring Boot built using Kotlin, H2, Postgres, Hibernate and JPA

Spring-Boot-Kotlin-Sample Spring Boot built using Kotlin, H2, Postgres, Hibernate and JPA Getting Started Reference Documentation For further referenc

MaxonBank is a Kotlin + Spring Boot + Axon Framework application that supports opening, depositing to, and withdrawing from accounts.

MaxonBank MaxonBank is a Kotlin + Spring Boot + Axon Framework application that supports opening, depositing to, and withdrawing from accounts. The ap

Spring Boot project scaffold written in Kotlin, which is based on the Official Guide.

Kotlin-Spring-Boot Spring Boot project scaffold written in Kotlin, which is based on the Official Guide. Development environment Windows choco install

Owner
Maksim Kostromin
Fullstack Senior Software Engineer, Team Lead in Software Company. I do cloud native Java, JS. Spring fan, Kotlin lover and Scala admirer. All we need is JVM
Maksim Kostromin
This repository demonstrates Spring GraphQL + RSocket + WebFlux + R2DBC + H2

Reactive GraphQL with Spring This repository demonstrates Spring GraphQL + RSocket + WebFlux + R2DBC + H2 O__ +-----------+

Maksim Kostromin 1 Nov 27, 2021
Spring-with-maven - Spring Boot App with Postgresql and maven

Spring Boot Api Aplikasi ini dibuat menggunakan bahasa kotlin dan untuk database

Aldi Aulia Rosyad 1 Jan 12, 2022
A sample skeleton backend app built using Spring Boot kotlin, Expedia Kotlin Graphql, Reactive Web that can be deployed to Google App Engine Flexible environmennt

spring-kotlin-gql-gae This is a sample skeleton of a backend app that was built using: Spring Boot(Kotlin) Reactive Web Sprinng Data R2DBC with MYSQL

Dario Mungoi 7 Sep 17, 2022
Spring-graphql-getting-started - Spring for GraphQL provides support for Spring applications built on GraphQL Java

Getting Started with GraphQL and Spring Boot Spring for GraphQL provides support

Shinya 0 Feb 2, 2022
This repository contains RabbitMQ Protobuf starters with its usage samples for spring-rabbit and spring-cloud-starter-stream-rabbit modules

This repository contains RabbitMQ Protobuf starters with its usage samples for spring-rabbit and spring-cloud-starter-stream-rabbit modules

Maksim Kostromin 2 Nov 29, 2021
Spring Boot Example with Kotlin and Domain Driven Design

Spring Boot Kotlin Domain Driven Design Example Just an example project where ddd is implemented with some other great patterns and architecture from

Fernando Guevara Sanchez 16 Jun 29, 2022
Sample Social Login Project of Spring Boot and Kotlin

Sample-Spring-Boot-Social-Kotlin Sample Social Login Project of Spring Boot and Kotlin dependencies dependencies { implementation("org.springframewor

Seokhyun 2 Oct 11, 2021
Generated with spring boot kotlin starter kit

Kotlin backend Generated with spring boot kotlin starter kit The idea is to: Get a microservice written in kotlin for managing users and roles. To be

Oriol Subirana 1 Oct 19, 2021
The Okila server project uses the Spring boot framework and uses the Kotlin language

Okila-Server The Okila server project uses the Spring boot framework and uses the Kotlin language Format Response //The response successfully format

Nankai 1 Oct 25, 2021
An application that simulate the Swedish Transport Agency, implemented with Spring Boot, Kotlin and GraphQL

graphql-kotlin-spring-server An application that simulate the Swedish Transport Agency, implemented with Spring Boot, Kotlin and GraphQL Running the s

null 0 Oct 31, 2021