TestController.java
607 Bytes
package com.glsx.usedcar.controller;
import com.glsx.usedcar.annotation.RequireLogin;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("/api/test")
@RequiredArgsConstructor
public class TestController {
@RequestMapping("/hello")
public String hello() {
return "hello world";
}
@RequireLogin
@RequestMapping("/hello2")
public String hello2() {
return "hello world2";
}
}