Skip to content
Snippets Groups Projects

Resolve "As a user, I want to have a page to upload and share photos so that another user can see my stories."

16 files
+ 399
42
Compare changes
  • Side-by-side
  • Inline
Files
16
package uk.ac.cf.spring.demo.sports.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebConfig implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/uploads/**")
.addResourceLocations("file:./uploads/"); // 指定静态资源的实际路径
}
}
Loading