Skip to content

How to customize a profile preset? #1016

Closed Answered by efenderbosch-atg
efenderbosch-atg asked this question in Q&A
Discussion options

You must be logged in to vote

I do have this working now. It would be a great addition to the project to have a Spring Boot auto-configuration library so we don't have to write this stuff ourselves. I can't share the full code, but here's the @Configuration and all the @ConfigurationProperties classes:

@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty("aws.jdbc.profile-preset")
@EnableConfigurationProperties(AwsJdbcDriverProperties::class)
class AwsJdbcDriverConfiguration {
    @Bean
    fun dataSource(dataSourceProps: DataSourceProperties, awsJdbcDriverProps: AwsJdbcDriverProperties): DataSource {
        val connectionProfile = ConnectionProfileBuilder.buildConfigurationProfile(awsJdbcDriverProps)
    …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by efenderbosch-atg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant