Instead of using Properties
inside the constructor I saw @Value
annotation should do the trick.
It works in another implementation that I have but here it doesn't
Controller:
@Autowired
private Customer customer;
My Class
@Service
public class Customer {
/** The soap GW endpoint. */
@Value("${soapGWEndpoint}")
private String soapGWEndpoint;
/** The soap GW app name. */
@Value("${soapGWApplName}")
private String soapGWAppName;
/** The soap GW user. */
@Value("${generic.user}")
private String soapGWUser;
/** The soap GW password. */
@Value("${generic.user.password}")
private String soapGWPassword;
public Customer () {
// All parameters are null:
login(soapGWEndpoint, soapGWAppName, soapGWUser, soapGWPassword);
}
}
But they are on the application.properties file.
Why in this occasion I cannot use @Value?