1. Which annotations will not allow you to apply bean property setter methods, non-setter methods, constructor and properties.
2. Which of the following are AOP implementation?
3. What are the types of Advice?
4. Which of the following class is used for executing the SQL queries in Spring?
5.
Which statement best describes the <context:annotation-config> tag for Spring XML configuration ?
6.
Which code will allow you to share services in different applications?
7. The target _________ is free to center on its major concern using the ________ concepts.
8. Choose the most probable reason why a Spring MVC bean correctly defined in a Java Configuration class is null in a Tomcat server?
9. The IoC container gets information from the ______ file.
10. What are the advantages of Spring Framework?
11. Choose the best explanation as to how Spring MVC ensures the @Singelton scope when injecting beans defined in a Java Configuration?
12.
What is constructor mode of autowiring?
13. Weaving is used to create new proxy _______ by applying aspects to target object?
14. The core ____________ module provides the fundamental functionality of the spring framework.
15. Which Spring's RestTemplate class methods will return a ResponseEntity?
16. Which statement best describes Spring Framework implementation of the Inversion of Control?
17. Which are the configuration types in Spring?
18. Which of the following collection types are supported by Spring?
19.
For the following Java configuration, Explain why the Cross Site Request Forgery protection is not correctly configured?
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http .csrf().disable();
} }
20. The ____________ module provides class instrumentation support and classloader implementations to be used in certain application servers.
21. Which of the following can be used to provide configuration metadata to the Spring Container?
22. Which of the following best describes the web module?
23.
Choose the correct expression needed to replace the error in the following code fragment for the Spring RestTemplate?
24. Which of the following is the best way to retrieve the response header for a RestTemplate post request?
25. Which statement is correct for @Controller annotation?
26. What are the modules of the core container?
27. The SpEL module provides a powerful expression ____________ for querying and manipulation of an object.
28. What are the benefits of IOC?
29. Which class can be used to call Stored Procedures in Spring?
30.
Which is the best explanation as to why this Java configuration fails to correctly override / add a resource handler?
31. Choose the reason why the expression ${user.home} can be null despite the use of @PropertySource annotation?
32.
Which statement best describes the <context:component-scan> tag for Spring XML configuration?
33. Which of the following is the most efficient way to serialize an Enum to JSON with Jackson 2.1?
34. Which of the following ViewResolver class is widely used?
35. Which of the following statements is/are true about autowiring in Spring?
36.
Fill in the blank:
In Spring's XML-based configuration, the _______ attribute of the <property/> element specifies a property or constructor argument as a string representation.
37. Which of the following statements is true about the @ModelAttribute annotation?
38.
When defining a bean that is created with a static factory method, the ______ attribute is used to specify the class containing the static factory method.
39. Regarding the @Resource annotation, which of the following statements is false?
40. Fill in the blank: _______ is a class-level annotation indicating that an object is a source of bean definitions.
41. Which of the following annotations are supported by classes with the @Bean annotation?
42. Which of the following is not a built-in Spring MVC bean scope?
43.
Which of the following statements are correct, with respect to using the @PreAuthorize annotation in Spring controller methods?
44.
Which of the following code samples will correctly return an image in @ResponseBody from a byte[] of image data?
45.
What is the difference between the @Repository and the @Controller annotations in Spring?
46. Which of the following statements is true about the @RequestParam annotation?
47.
Which of the following can be used to serve static resources while still using DispatchServlet at the site's root?
48.
Which of the following statements is correct?
49. Which of the following enables custom qualifier annotation types to be registered even if they are not annotated with Spring’s @Qualifier annotation?
50. True or false: a factory class can hold more than one factory method.
51. Which of the following is the default bean scope in Spring MVC?
52. How can an HTTP 404 status code be returned from a Spring MVC Controller?
53. Which of the following statements is true about the HandlerInterceptor interface?
54.
What does the following code do?
@RequestMapping("/{id}/**")
public void foo(@PathVariable("id") int id, HttpServletRequest request) {
String restOfTheUrl = (String) request.getAttribute(
HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
...
}
55.
Which of the following statements is true for the configuration of the Spring handler adapter(s) in a Spring MVC application context?
56. Which of the following statements is true about the @RequestMapping annotation?
57.
The _______ enables the use of the bean element’s attributes, instead of nested <property/> elements, to describe property values and/or collaborating beans.
58.
Which of the following is true about the use of <context:annotation-config /> in a servlet?
59.
Given the method below:
@RequestMapping(value = "/foo", method = RequestMethod.GET)
public final String foo(HttpServletRequest request, BindingResult bindResult, ModelMap model) {
model.addAttribute("abc", 123);
return "foo";
When the view is displayed in the browser, it's URL is "http://mydomain/foo?abc=123".
Which of the following statements is true?
60. Which of the following classes provides built-in pagination functionality in SpringMVC?
61.
Given the following method:
@RequestMapping(method=RequestMethod.GET, value="/fooBar")
public ResponseEntity<String> fooBar2() {
String json = "jsonResponse";
HttpHeaders responseHeaders = new HttpHeaders();
responseHeaders.setContentType(MediaType.APPLICATION_JSON);
return new ResponseEntity<String>(json, responseHeaders, HttpStatus.CREATED);
62. Which of the following statements is true about method arguments that have an @ModelAttribute annotation?
63. Which of the following statements is true about the HandlerExceptionResolver class?
64.
Which of the following statements is false?
65. Select all authentication methods that are supported by Spring Security by default:
66. Which of the following interfaces can be implemented to interact with a container's management of the bean lifecycle?
67. Which of the following dependency injection (DI) methodologies are available in Spring MVC?
68. Which of the following are possible validation methods for user input in Spring MVC?
69.
Which of the following are valid sets of constructor arguments for the ModelAndView class? (Select all correct answers.)
70. Which of the following code samples will get the ServletContext inside an Interceptor?
71.
In an annotation-based Spring MVC controller, which of the following are valid ways to set cache headers for a specific path?
Mobile App Testing
Delphi
Ruby
Ning Skills
Mac OS
Cyber Security
Related MCQ's
Popular MCQ's