All dear Master, please help me Why my @Value failed to load my application.properties, do i got to add any configuration? here my code My DataprocClient.java
@Component
public class DataprocClient {
@Value("${ipdataprocessing}")
private String ipDataProcessing;
public ResponseModel reqDataproc(String uri,MultiValueMap<String, String> post) {
System.out.println("ipDataProcessing"+ipDataProcessing);
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(post, headers);
RestTemplate restTemplate = new RestTemplate();
ResponseModel responseModel = new ResponseModel();
responseModel = restTemplate.postForObject(ipDataProcessing, request, ResponseModel.class);
return responseModel;
}
}
my application.properties
dataprocurl=http://10.245.4.132:8100/api/kswpService
ipdataprocessing=http://127.0.0.1:8080
server.port=80
server.max-http-header-size=10000000
spring.boot.admin.url=http://localhost:8888
management.security.enabled=false
spring.application.name=DataProcess-DB
i am new in springboot please help me.......