Java 企业级框架测验
Java 测验题
通过对Java 教程系统地学习,相信你已全面掌握了 Java 企业级框架知识点,为了巩固所学的内容,我们准备了一个小测验。
通过这个测验,您可以检验自己对 Java 的掌握程度,发现可能需要进一步巩固的地方。
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
1. 在Spring框架中,哪个注解用于标记一个类为Spring MVC的控制器?
- @Service
- @Controller
- @Repository
- @Component
2. 在Spring Boot中,哪个注解用于启动一个Spring应用程序?
- @EnableAutoConfiguration
- @SpringBootApplication
- @Configuration
- @ComponentScan
3. 在Hibernate中,哪个接口用于执行数据库操作?
- Session
- EntityManager
- Transaction
- Query
4. 在Spring中,哪个注解用于依赖注入?
- @Resource
- @Inject
- @Qualifier
- @Autowired
5. 在Spring Security中,哪个类用于配置安全规则?
- SecurityConfig
- WebSecurityConfigurerAdapter
- AuthenticationManager
- UserDetailsService
6. 在Spring中,哪个注解用于声明一个Bean?
- @Service
- @Component
- @Bean
- @Configuration
7. 在JPA中,哪个注解用于标记实体类?
- @Entity
- @Table
- @Id
- @Column
8. 在Spring Boot中,哪个文件用于配置应用程序属性?
- pom.xml
- web.xml
- config.xml
- application.properties
9. 在Spring中,哪个注解用于处理HTTP GET请求?
- @RequestMapping
- @GetMapping
- @PostMapping
- @PutMapping
10. 在Hibernate中,哪个注解用于标记主键字段?
- @Column
- @GeneratedValue
- @Id
- @PrimaryKey
11. 在Spring中,哪个接口用于访问应用上下文?
- ApplicationContext
- BeanFactory
- ConfigurableApplicationContext
- WebApplicationContext
12. 在Spring Boot中,哪个注解用于启用Spring MVC?
- @EnableWeb
- @EnableMvc
- @EnableSpringMvc
- @EnableWebMvc