diff --git a/spring-security-modules/spring-security-saml/src/main/java/com/baeldung/saml/config/SamlSecurityConfig.java b/spring-security-modules/spring-security-saml/src/main/java/com/baeldung/saml/config/SamlSecurityConfig.java index 378db478cf..8bc97cb81e 100644 --- a/spring-security-modules/spring-security-saml/src/main/java/com/baeldung/saml/config/SamlSecurityConfig.java +++ b/spring-security-modules/spring-security-saml/src/main/java/com/baeldung/saml/config/SamlSecurityConfig.java @@ -143,7 +143,7 @@ public class SamlSecurityConfig { public ExtendedMetadataDelegate oktaExtendedMetadataProvider() throws MetadataProviderException { File metadata = null; try { - metadata = new File("./src/main/resources/saml/metadata/sso.xml"); + metadata = new ClassPathResource("saml/metadata/sso.xml").getFile(); } catch (Exception e) { e.printStackTrace(); }