Spring Boot выдает Caused by: java.lang.IllegalArgumentException: null
при автоматической настройке компонента.У меня нет null
свойств в моем application.properties
файле.Это загадка.
Я попробовал всего понемногу.Сообщение об ошибке указывает, что проблема связана со свойством factory.core в файле.Я попытался удалить его, но получаю более общую ошибку.Если я верну factory.core обратно, то ошибка будет пожаловаться именно на него.
У моего application.properties есть эти четыре:
factory.protocol=http
factory.host=localhost
factory.core=recommend
factory.port=8983
У меня есть эти аннотации
@Configuration
@ConfigurationProperties("factory")
В моем коде есть только установщики и получатели для этих полей.
private String protocol;
private String host;
private int port;
private String core;
Spring Boot записывает это.
Description:
Failed to bind properties under 'factory' to com.ot.cem.recommender.engine.ClientFactory$$EnhancerBySpringCGLIB$$1530d0ff:
Property: factory.core
Value: recommend
Origin: class path resource [application.properties]:4:14
Reason: Failed to bind properties under 'factory' to com.ot.cem.recommender.engine.ClientFactory$$EnhancerBySpringCGLIB$$1530d0ff
Action:
Update your application's configuration
The exception is
Caused by: java.lang.IllegalArgumentException: null
at java.lang.reflect.Array.newArray(Native Method) ~[na:1.8.0_162]
at java.lang.reflect.Array.newInstance(Array.java:75) ~[na:1.8.0_162]
at org.springframework.boot.context.properties.bind.Bindable.box(Bindable.java:255) ~[spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]
at org.springframework.boot.context.properties.bind.Bindable.of(Bindable.java:248) ~[spring-boot-2.0.6.RELEASE.jar:2.0.6.RELEASE]