热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

模拟考试

设为首页

收藏此页面

订阅邮箱地址

Spring Boot 面试题与答案

Test your skills through the online practice test: Spring Boot Quiz Online Practice Test

相关差异对比

问题 46. Explain CORS in Spring Boot?

CORS stands for Cross-Origin Resource Sharing is a  mechanism implemented by browsers and helps users to authorize cross-domain requests. This mechanism serves as an alternative to less secure and less powerful hacks of the kinds of IFrame or JSONP.

这有帮助吗? 添加评论 查看评论
 

问题 47. What is the default package in Spring Boot?

A class without any package declaration is considered as a default package.

这有帮助吗? 添加评论 查看评论
 

问题 48. How can you set active profile in Spring Boot?

Follow the following methods to set an active profile in Spring Boot.
  • Pass this profile as an argument when you launch the Spring Boot application (java -jar -Dspring.profiles.active=dev Sample-1.0-SNAPSHOT.jar).
  • Set active the active profile in application.properties file (spring.profiles.active=dev).

这有帮助吗? 添加评论 查看评论
 

问题 49. List out some of the Spring Boot Starters.

Different Spring Boot Starters are as follows:
  • Security
  • Parent
  • web
  • Thymeleaf
  • Freemarker

这有帮助吗? 添加评论 查看评论
 

问题 50. How to scan all the beans and package declarations in Spring Boot?

Spring Boot application scans all the beans and package declarations when the application initializes. You need to add the @ComponentScan annotation for your class file to scan your components added in your project.
@ComponentScan
public class DemoApplication {
   public static void main(String[] args) {
      SpringApplication.run(DemoApplication.class, args);
   }
}

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。
Spring vs Spring BootNodeJS vs Spring BootSpring MVC vs Spring Boot