Skip to content

Spring Boot Upgrade 3.0.0 M3

Fabian Krüger edited this page Jun 22, 2022 · 1 revision

Improved @ConstructorBinding Detection

@ConstructorBinding with one constructor

Given

@Component
class SomeService {}

@PropertySource(prefix="mail")
@ConstructorBinding
public Foo {
  String bar;
}

@PropertySource(prefix="my")
@ConstructorBinding
public class MyProps {
  // inject spring bean
  public MyProps(@Autowired Foo foo, @Autowired SomeService bean, String additionalField) {

  }
}

Becomes

@ConstructorBinding with multiple constructors

…​