Springboot 2 Элементы остались несвязаннымиJAVA

Программисты JAVA общаются здесь
Anonymous
Springboot 2 Элементы остались несвязанными

Сообщение Anonymous »

У меня есть файловое приложение. Myml с моим приложением Spring Boot, которое не желает работать. b12, simulator.geo.b13, simulator.geo.b21, simulator.geo.c6, simulator.geo.host] были оставлены несвязанными. Это свойство, однако, установлено в Application.yml, а компилятор даже возвращает свое значение. p>

simulator:
geo:
host: http://localhost:8080/
b12: http://localhost:8080/geo/b12
b13: http://localhost:8080/geo/b13
b21: http://localhost:8080/geo/b21
c6: http://localhost:8080/geo/c6
< /code>

и Java class < /p>

@Getter
@Configuration
@ConfigurationProperties(prefix = "simulator",ignoreUnknownFields = false)
public class VendorSimulatorProperties {

@Value("${simulator.geo.host:http://localhost:8080/}")
private String initUrl;

@Value("${simulator.geo.b12}")
private String geoB12Url;

@Value("${simulator.geo.b13}")
private String geoB13Url;

@Value("${simulator.geo.b21}")
private String geoB21Url;

@Value("${simulator.geo.c6}")
private String geoC6Url;
}
< /code>

Когда я начинаю запускать приложение, я получил ошибку msg: < /p>

**************************
APPLICATION FAILED TO START
***************************

Description:

Binding to target [Bindable@1c140c7c type = com.mathartsys.dlc.thirdparty.vendor.config.VendorSimulatorProperties$$EnhancerBySpringCGLIB$$eb0a550b, value = 'provided', annotations = array[@org.springframework.boot.context.properties.ConfigurationProperties(prefix=simulator, value=simulator, ignoreUnknownFields=false, ignoreInvalidFields=false)]] failed:

Property: simulator.geo.b12
Value: http://localhost:8080/geo/b12
Origin: class path resource [config/application-dev.yml]:204:14
Reason: The elements [simulator.geo.b12,simulator.geo.b13,simulator.geo.b21,simulator.geo.c6,simulator.geo.host] were left unbound.
Property: simulator.geo.b13
Value: http://localhost:8080/geo/b13
Origin: class path resource [config/application-dev.yml]:205:14
Reason: The elements [simulator.geo.b12,simulator.geo.b13,simulator.geo.b21,simulator.geo.c6,simulator.geo.host] were left unbound.
Property: simulator.geo.b21
Value: http://localhost:8080/geo/b21
Origin: class path resource [config/application-dev.yml]:206:14
Reason: The elements [simulator.geo.b12,simulator.geo.b13,simulator.geo.b21,simulator.geo.c6,simulator.geo.host] were left unbound.
Property: simulator.geo.c6
Value: http://localhost:8080/geo/c6
Origin: class path resource [config/application-dev.yml]:207:13
Reason: The elements [simulator.geo.b12,simulator.geo.b13,simulator.geo.b21,simulator.geo.c6,simulator.geo.host] were left unbound.
Property: simulator.geo.host
Value: http://localhost:8080/
Origin: class path resource [config/application-dev.yml]:203:15
Reason: The elements [simulator.geo.b12,simulator.geo.b13,simulator.geo.b21,simulator.geo.c6,simulator.geo.host] were left unbound.
< /code>

Эта проблема запутала меня много времени, я надеюсь, что кто -то может дать мне несколько советов;
я использовал Spring Boot 2.0
спасибо < /p>

Подробнее здесь: https://stackoverflow.com/questions/531 ... ft-unbound

Вернуться в «JAVA»