参考: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);
    }
}

  

相关文章:

  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-03
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-27
  • 2022-12-23
  • 2021-11-30
  • 2021-10-17
  • 2022-12-23
  • 2021-07-07
相关资源
相似解决方案