Hi, I'm new to Java and Spring. I have the following problem and I hope your support. I would really appreciate it very much.
"Record" is not available in java 8, I have used intellij idea to do the conversion to a normal class and when executing the application it gives me the following error. (In java 17 it runs without any problem)
Parameter 0 of constructor in dev.danvega.jwt.config.RsaKeyProperties required a bean of type 'java.security.interfaces.RSAPublicKey' that could not be found.
How can I solve it?
Class:
@ConfigurationProperties(prefix = "rsa")
public final class RsaKeyProperties {
private final RSAPublicKey publicKey;
private final RSAPrivateKey privateKey;
public RsaKeyProperties(RSAPublicKey publicKey, RSAPrivateKey privateKey) {
this.publicKey = publicKey;
this.privateKey = privateKey;
}
public RSAPublicKey publicKey() {
return publicKey;
}
public RSAPrivateKey privateKey() {
return privateKey;
}
@Override
public boolean equals(Object obj) {
if (obj == this) return true;
if (obj == null || obj.getClass() != this.getClass()) return false;
var that = (RsaKeyProperties) obj;
return Objects.equals(this.publicKey, that.publicKey) &&
Objects.equals(this.privateKey, that.privateKey);
}
@Override
public int hashCode() {
return Objects.hash(publicKey, privateKey);
}
@Override
public String toString() {
return "RsaKeyProperties[" +
"publicKey=" + publicKey + ", " +
"privateKey=" + privateKey + ']';
}
}
Hi, I'm new to Java and Spring. I have the following problem and I hope your support. I would really appreciate it very much.
"Record" is not available in java 8, I have used intellij idea to do the conversion to a normal class and when executing the application it gives me the following error. (In java 17 it runs without any problem)
Parameter 0 of constructor in dev.danvega.jwt.config.RsaKeyProperties required a bean of type 'java.security.interfaces.RSAPublicKey' that could not be found.
How can I solve it?
Class: