Remove explicit @ConstructorBinding on type
See gh-23216
This commit is contained in:
@@ -17,11 +17,9 @@
|
||||
package org.springframework.boot.docs.features.externalconfig.typesafeconfigurationproperties.constructorbinding
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties
|
||||
import org.springframework.boot.context.properties.ConstructorBinding
|
||||
import org.springframework.boot.context.properties.bind.DefaultValue
|
||||
import java.net.InetAddress
|
||||
|
||||
@ConstructorBinding
|
||||
@ConfigurationProperties("my.service")
|
||||
class MyProperties(val enabled: Boolean, val remoteAddress: InetAddress,
|
||||
val security: Security) {
|
||||
|
||||
@@ -17,11 +17,9 @@
|
||||
package org.springframework.boot.docs.features.externalconfig.typesafeconfigurationproperties.constructorbinding.nonnull
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties
|
||||
import org.springframework.boot.context.properties.ConstructorBinding
|
||||
import org.springframework.boot.context.properties.bind.DefaultValue
|
||||
import java.net.InetAddress
|
||||
|
||||
@ConstructorBinding
|
||||
@ConfigurationProperties("my.service")
|
||||
class MyProperties(val isEnabled: Boolean, val remoteAddress: InetAddress,
|
||||
@param:DefaultValue val security: Security) {
|
||||
|
||||
@@ -17,13 +17,11 @@
|
||||
package org.springframework.boot.docs.features.externalconfig.typesafeconfigurationproperties.conversion.datasizes.constructorbinding
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties
|
||||
import org.springframework.boot.context.properties.ConstructorBinding
|
||||
import org.springframework.boot.context.properties.bind.DefaultValue
|
||||
import org.springframework.boot.convert.DataSizeUnit
|
||||
import org.springframework.util.unit.DataSize
|
||||
import org.springframework.util.unit.DataUnit
|
||||
|
||||
@ConfigurationProperties("my")
|
||||
@ConstructorBinding
|
||||
class MyProperties(@param:DataSizeUnit(DataUnit.MEGABYTES) @param:DefaultValue("2MB") val bufferSize: DataSize,
|
||||
@param:DefaultValue("512B") val sizeThreshold: DataSize)
|
||||
|
||||
@@ -17,13 +17,11 @@
|
||||
package org.springframework.boot.docs.features.externalconfig.typesafeconfigurationproperties.conversion.durations.constructorbinding
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties
|
||||
import org.springframework.boot.context.properties.ConstructorBinding
|
||||
import org.springframework.boot.context.properties.bind.DefaultValue
|
||||
import org.springframework.boot.convert.DurationUnit
|
||||
import java.time.Duration
|
||||
import java.time.temporal.ChronoUnit
|
||||
|
||||
@ConfigurationProperties("my")
|
||||
@ConstructorBinding
|
||||
class MyProperties(@param:DurationUnit(ChronoUnit.SECONDS) @param:DefaultValue("30s") val sessionTimeout: Duration,
|
||||
@param:DefaultValue("1000ms") val readTimeout: Duration)
|
||||
|
||||
Reference in New Issue
Block a user