Skip to content

Commit

Permalink
Fix #1687: Error java.net.MalformedURLException: unknown protocol: cl…
Browse files Browse the repository at this point in the history
…asspath (#1688)
  • Loading branch information
romanstrobl authored Aug 8, 2024
1 parent bbaddc7 commit 6cbf405
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.UrlResource;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
Expand Down Expand Up @@ -146,7 +145,7 @@ public Resource languageSettingSource() throws MalformedURLException {
Resource resource = resourceLoader.getResource(configuration.getResourcesLocation() + "lang.json");
if (!resource.exists()) {
logger.info("The lang.json file was not found in {}, using default location", configuration.getResourcesLocation());
resource = new UrlResource("classpath:/static/resources/lang.json");
resource = resourceLoader.getResource("classpath:/static/resources/lang.json");
}
return resource;
}
Expand Down

0 comments on commit 6cbf405

Please sign in to comment.