Я хотел бы использовать Springboot @ConfigurationProperties для введения настройки в неизменные объекты, используя конструктор. /> [*] sb2: org.springframework.boot.context.properties.constructorbinding
[*] sb3: org.springframework.boot.context.properties.bind.constructorbinding
It works under SB2 but when I run under SB3 I get
Failed to bind properties under 'myprefix.foo' to com.disney.misc.Foo:
Property: myprefix.foo.a
Value: "11"
Origin: class path resource [application.yml] - 43:12
Reason: java.lang.IllegalStateException: No setter found for property: a
< /code>
And I assume if I change the package name to the SB3 version it will work under 3 and not 2.
Подробнее здесь: https://stackoverflow.com/questions/796 ... ot-2-and-3
Включите настройки в неизменную объект как в Springboot 2, так и в 3 и 3 ⇐ JAVA
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение