Spring MVC Test
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.
Fill in the blank: The _______ enables the use of the bean element’s attributes, instead of nested <property/> elements, to describe property values and/or collaborating beans.
Fill in the blank: 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.
Fill in the blank: _______ is a class-level annotation indicating that an object is a source of bean definitions.
Given the following method: @RequestMapping(method=RequestMethod.GET, value="/fooBar") public ResponseEntity<String> fooBar2() { String json = "jsonResponse"; HttpHeaders responseH...
Given the method below: @RequestMapping(value = "/foo", method = RequestMethod.GET) public final String foo(HttpServletRequest request, BindingResult bindResult, ModelMap model) { model.addAtt...
How can an HTTP 404 status code be returned from a Spring MVC Controller?
In an annotation-based Spring MVC controller, which of the following are valid ways to set cache headers for a specific path?
Regarding dependency resolution, which of the following statements is false?
Regarding the @Resource annotation, which of the following statements is false?
Select all authentication methods that are supported by Spring Security by default:
True or false: a factory class can hold more than one factory method.
What does the following code do? @RequestMapping("/{id}/**") public void foo(@PathVariable("id") int id, HttpServletRequest request) { String restOfTheUrl = (String) request.getAttribute( ...
What is the difference between the @Repository and the @Controller annotations in Spring?
Which of the following statements is true about method arguments that have an @ModelAttribute annotation?
Which of the following annotations are supported by classes with the @Bean annotation?
Which of the following are possible validation methods for user input in Spring MVC?
Which of the following are valid sets of constructor arguments for the ModelAndView class? (Select all correct answers.)
Which of the following can be used to serve static resources while still using DispatchServlet at the site's root?
Which of the following classes provides built-in pagination functionality in SpringMVC?
Which of the following code samples will correctly return an image in @ResponseBody from a byte[] of image data?
Which of the following code samples will get the ServletContext inside an Interceptor?
Which of the following dependency injection (DI) methodologies are available in Spring MVC?
Which of the following enables custom qualifier annotation types to be registered even if they are not annotated with Spring’s @Qualifier annotation?
Which of the following interfaces can be implemented to interact with a container's management of the bean lifecycle?
Which of the following is not a built-in Spring MVC bean scope?
Which of the following is the default bean scope in Spring MVC?
Which of the following is true about the use of <context:annotation-config /> in a servlet?
Which of the following statements are correct, with respect to using the @PreAuthorize annotation in Spring controller methods?
Which of the following statements is correct?
Which of the following statements is false?
Which of the following statements is true about the @ModelAttribute annotation?
Which of the following statements is true about the @RequestMapping annotation?
Which of the following statements is true about the @RequestParam annotation?
Which of the following statements is true about the HandlerExceptionResolver class?
Which of the following statements is true about the HandlerInterceptor interface?
Which of the following statements is true for the configuration of the Spring handler adapter(s) in a Spring MVC application context?
Which of the following statements is/are true about autowiring in Spring?