A collection of Spring-Boot supporting tools.
Import the BOM into your Maven project.
<dependency>
<groupId>io.toolisticon.spring</groupId>
<artifactId>spring-boot-bom</artifactId>
<version>1.0.1</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Provides useful Spring-Boot conditions.
@ConditionalOnMissingQualifiedBean
<dependency>
<groupId>io.toolisticon.spring</groupId>
<artifactId>spring-boot-conditions</artifactId>
</dependency>
Allows to define default properties as part of the starter using supplied YAML file.
<dependency>
<groupId>io.toolisticon.spring</groupId>
<artifactId>spring-boot-properties</artifactId>
</dependency>
Define properties
@ConfigurationProperties("myprops")
data class MyProperties(
val foo: String,
val zee: Int,
val baz: Boolean
)
Define configuration:
@EnableConfigurationProperties(MyProperties::class)
@PropertySource(
name = "myDefaultProperties",
value = ["classpath:/application-my-default.yaml"],
factory = YamlPropertySourceFactory::class
)
class MyConfiguration
Put a application-my-default.yaml
into src/main/resources
:
myprops:
foo: "bar"
zee: 42
baz: true
This library is published under the Apache 2.0 license.