单项选择题
在Spring Boot应用中,以下哪个注解用于表示一个RESTful的Controller?()
A.@Controller
B.@RestController
C.@Service
D.@Repository
点击查看答案&解析
相关考题
-
单项选择题
在Spring Boot应用中,如何配置应用名称?()
A.在application.properties中设置server.name
B.在application.properties中设置spring.application.name
C.在application.yml中设置name
D.在application.yml中设置spring.name -
单项选择题
在Spring Boot应用中,如果需要在启动时运行一些代码,应该使用哪种方式?()
A.使用@PostConstruct注解在Bean中
B.实现CommandLineRunner接口
C.实现ApplicationRunner接口
D.A和B都可以 -
单项选择题
Spring Boot应用默认的日志框架是()
A.Log4j
B.Logback
C.Log4j2
D.JUL
