Согласно журналам, причина элементов [simulator.geo. b12,simulator.geo.b13,simulator.geo.b21,simulator.geo.c6,simulator.geo.host] остались несвязанными. Однако это свойство установлено в application.yml, и компилятор даже возвращает его значение.
Я буду очень признателен, если кто-нибудь поможет мне с этой проблемой. р>
Код: Выделить всё
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
Код: Выделить всё
@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;
}
Код: Выделить всё
**************************
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.
я использовал Spring Boot 2.0
спасибо
Подробнее здесь: https://stackoverflow.com/questions/531 ... ft-unbound
Мобильная версия