Prośba o wsparcie... Mam zagwostkę sonarową, której nie mogę rozkimać:
- Sonarqube Mówi: Annotate this member with "@Authowired", "@Resource", "@Inject" or "@Value", or remove it. (w odniesieniu do credentials się czepia):
Wklejam kawałek kodu:
@Service
public class DocServiceBean implements DocService{
@Value("${bla}")
private String accountNr;
@Value("${blabla}")
private String accountKey;
private SharedCredentials credentials;
@PostConstuct
private void init() {
try { this.credentials = new SharedCredentials(accountNr, accountKey);
} catch (InvalidKeyException e){
log.error(e.getMessage())}
}
}
Co zrobić z tym polem credentials? Jaka adnotacja? Dzięki!