Comments (3)
My workaround is to declare them next to each other and do the nesting via the annotation value:
@ConfigurationProperties("level1")
interface ConfigurationLevel1 {
val foo: String
}
@ConfigurationProperties("level1.level2")
interface ConfigurationLevel2 {
val bar: String
}
@ConfigurationProperties("level1.level2.level3")
interface ConfigurationLevel3 {
val baz: String
}
from micronaut-core.
Is it supported in Java? Or with KAPT?
from micronaut-core.
Yes, it worked with KAPT before we switched to KSP because KAPT isn't being developed anymore.
Also, the documentation says that this is supported:
Complex nested properties are supported via classes that are public static inner classes and are also annotated with ConfigurationProperties.
from micronaut-core.
Related Issues (20)
- HTTP generates an error 'Failed to convert argument [q] for value [null] ' after migrating to Micronaut 4 HOT 1
- Ignored annotation metadata default value HOT 1
- Kapt treats annotation's default "" value as null, while KSP treats it as empty string HOT 1
- Unable to Get Body in Filter class HOT 2
- KSP with micronaut 4.2.2: `@Client` annotated class not introspected when use also `@Generated` annotation HOT 7
- AbstractMethodError when using KSP instead of KAPT with @Client HOT 3
- StreamingHttpClient throws exception HOT 3
- PathVariable annotation doesn't bind default value when URI variable is missing HOT 1
- Porting our WebPortal Software to Micronaut 4.4 HOT 1
- Access log `%U` and `%q` are not supported HOT 2
- Subtype of a Controller return type didn't work anymore since Micronaut 4 HOT 3
- Property value should be trimmed HOT 1
- Issue with Response Body Conversion after Upgrading to 4.2.1
- Overriding ObjectMapperFactory does not work for setDefaultSetterInfo HOT 3
- the unnamed module reads package io.micronaut.inject.annotation from both io.micronaut.core_processor and io.micronaut.inject HOT 15
- Inconsistent Versions Listed In User Guide HOT 1
- Documentation is unclear on `*` configuration fields that can have arbitrary values
- Native image build fails when trying to package an AWS lambda micronaut app as a native executable HOT 1
- Propagate ScopedValues from filters to controllers HOT 8
- micronaut-inject-java and lombok library is having conflicts HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micronaut-core.