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