单项选择题
在Spring Boot中,哪个依赖包含了Spring MVC和嵌入式Tomcat?()
A.spring-boot-starter-web
B.spring-boot-starter-data-jpa
C.spring-boot-starter-test
D.spring-boot-starter-aop
点击查看答案&解析
相关考题
-
单项选择题
在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都可以
