test:测试addResourceHandlers
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.tiesheng.demo.config;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Component
|
||||
public class DemoWebMvcConfigurer implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("/mobile/**").addResourceLocations("classpath:/mobile/0.0.13/");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.tiesheng.demo.controller;
|
||||
|
||||
import com.tiesheng.annotation.token.TokenIgnore;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
/**
|
||||
* @author hao
|
||||
*/
|
||||
@Controller
|
||||
public class RedirectController {
|
||||
|
||||
@GetMapping("/return")
|
||||
@TokenIgnore
|
||||
public String redirect() {
|
||||
return "mobile/0.0.13/index.html";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user