@RestController
是一个原型注解。它将@Controller
和@ResponseBody
注释添加到类中。我们需要在文件中导入 org.springframework.web.bind.annotation
包,以实现它。
8、Spring Boot注解是什么?
8、Spring Boot注解是什么?
@RestController
是一个原型注解。它将@Controller
和@ResponseBody
注释添加到类中。我们需要在文件中导入 org.springframework.web.bind.annotation
包,以实现它。