add:实现功能

master
msb_89821 2 years ago
parent 2349cfa8bf
commit bcc9e33040

@ -2,23 +2,25 @@ package mashibing.online.text.controller;
import com.mashibing.dto.ResponseResult; import com.mashibing.dto.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController @RestController
@RequestMapping("/test") @RequestMapping("/test")
public class TokenTest { public class TokenTest {
@GetMapping("/authTokenTest") @GetMapping("/authTokenTest")
public ResponseResult authTokenTest(String token){ public ResponseResult authTokenTest(){
log.info("需要token 校验的接口 ");
return ResponseResult.success("auth token pass!"); return ResponseResult.success("auth token pass!");
} }
@GetMapping("/noTokenTest") @GetMapping("/noTokenTest")
public ResponseResult noTokenTest(String token){ public ResponseResult noTokenTest(){
log.info("不需要token 校验的接口 ");
return ResponseResult.success(" not need token !"); return ResponseResult.success(" not need token !");
} }

Loading…
Cancel
Save