You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I migrated an application from spring-boot 3.3.6 to 3.4.2. We have below code to create a static resource locator:
@Bean
RouterFunction staticResourceLocator() {
return RouterFunctions.resources("/**", new FileSystemResource("/opt/cfg/static/"));
}
After the migration this code is throwing an exception:
Failed to instantiate [org.springframewok.we.reactive.function.server.RouterFunction]: Factory method 'stticResourceLocator' threw exception with message: Resource location does not end with slash: /opt/cfg/static
I found that when FileSystemResource is created there is a call to StringUtils.cleanPath(path) where the last slash is removed from the original path.
is there another way to create the FileSystemResource and preserve the last slash?
The text was updated successfully, but these errors were encountered:
I migrated an application from spring-boot 3.3.6 to 3.4.2. We have below code to create a static resource locator:
After the migration this code is throwing an exception:
Failed to instantiate [org.springframewok.we.reactive.function.server.RouterFunction]: Factory method 'stticResourceLocator' threw exception with message: Resource location does not end with slash: /opt/cfg/static
I found that when FileSystemResource is created there is a call to StringUtils.cleanPath(path) where the last slash is removed from the original path.
is there another way to create the FileSystemResource and preserve the last slash?
The text was updated successfully, but these errors were encountered: