参考:https://blog.csdn.net/feng2147685/article/details/95623135
package com.online.director; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; /** * Created by zhang_guang_yang on 2019/11/1. */ @Configuration public class OnlineDirectorWebAppConfigurer extends WebMvcConfigurerAdapter { @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/server/**").addResourceLocations("file:/Users/zhang_guang_yang/Python/server/"); super.addResourceHandlers(registry); } }
原文地址:https://www.cnblogs.com/yangzigege/p/11783668.html
时间: 2024-10-12 09:41:09