Create a class in the project and write the following:
package< span style="color: #000000;"> com.f*iservice.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @ClassName FeiController
* @Description
* @Author chenfei
* @Date 2019-07-12 16:50
**/
@RestController
@RequestMapping("/f*i")
public class FeiController {
@GetMapping("/*f")
public int getFei(){
return 1;
}
}
The project starts, visit in the browser, and return the following content:
package com.f*iservice.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @ClassName FeiController
* @Description
* @Author chenfei
* @Date 2019-07-12 16:50
**/
@RestController
@RequestMapping("/f*i")
public class FeiController {
@GetMapping("/*f")
public int getFei(){
return 1;
}
}