1. Which of these resource prefixes could be used?
2. spring-test uses what common convention to allow testing using HTTP session and HTTP request objects?
3. True or False? Using Spring's JDBC support forces you to use Oracle.
4. Which of the following is NOT a scope available in Spring web applications?
5. In the following code: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <bean id="helloWorld" class="com.tutorialspoint.HelloWorld"> <property name="message" value="Hello World!"/> </bean> </beans> The HelloWorld class should have a method called what?
6. How is slf4j commonly used in Spring applications?
7. Is the following valid ? - <map><entry key="a" value="b" /></map>
8. Which of the following is NOT a JDBC statement?
9. Which annotation lets you grab the value of an HTTP request header?
10. Which one of the following statements is NOT true about MVC pattern?
11. What is one of the major improvements in Spring 3?
12. Which of the following is a synonym for dependency injection?
13. @RequestMapping is part of which part of Spring?
14. Does Spring support injection of Enum types?
15. Is it possible to set up Spring AOP using XML configuration only (as opposed to annotations)?
16. Which of the following is not a valid method to provide configuration metadata to a Spring Container?
17. True or False? @RequestMapping can be used on an entire class as well as on individual methods.
18. How many bean configuration files can you have?
19. True or False? Spring Web MVC supports different locales out of the box.
20. What type of dependency injection does Spring NOT support?
21. What if I need a method to be called after bean construction?
22. In AOP, what are the different points where weaving can be applied?
23. What is MultipartFile used for?
24. Configuration to declare a JTA transaction manager “<bean id="mgr" class="org.springframework.transaction.jta.JtaTransactionManager" />“ Is this correct?
25. True or False? Spring supports custom bean scopes.
26. What are the different modules in Spring framework?
27. What types of transaction management does Spring support?
28. What is AOP?
29. Can you inject null and empty string values in Spring?
30. What does a bean definition contain?
31. How are mocks used in Spring?
32. What is the SpringJUnit4ClassRunner class used for?
33. What is NOT a way for beans to be defined?
34. How can you provide configuration metadata to the Spring container?
35. Which of these are types of IOC (dependency injection) ?
36. Which of the following ORM are supported in Spring
37. Spring Security currently supports authentication integration with which of the following technology
38. True or False? Spring provides an abstraction over JMS.
39. True or False? Spring supports lookup via JNDI.
40. Which of the following is true when creating a custom login form for applications using Spring Security?
41. What is bean wiring?
42. Transaction MUST follow which of the following properties?
43. Which of the following statements are true about Spring Testing Support?
44. What is the difference between Bean Factory and Application Context?
45. Which of the following is NOT a HTTP operation?
46. What are the supported scopes in Hibernate?
47. What are the different points where weaving can be applied?
48. The transaction attribute supported by Spring includes:
49. Which of the following are Autowire types?
50. What is the name of the central servlet which is part of Spring?
51. What are the most used classes in Spring DAO?
52. Which of the following statements is correct about Spring MVC:
53. which one of the following is the correct sequence of how a normal view request is handled in a web application using Spring MVC: 1. Request: A request is submitted to the server. 2. Invokes: The dispatcher dispatches the request to the appropriate controller based on the HTTP request information and the web application configuration. 3. Service Call: The controller interacts with the service layer. 4. Response: The controller updates the model and, based on the execution result, returns the corresponding view to the user.
54. Which is the most popular way of interfacing with Spring's JDBC support?
55. What's the relationship between Spring and Maven?
56. Which of the following concrete implementation, by default, handles the request 'first' when it is sent to a Spring MVC Framework?
57. Which one of the following annotation can be used to inject dependencies a) @Inject b) @Entity c) @Valid d) @Autowire
58. How could you inject using a factory method ?
59. In Spring, singleton means only one instance per _____.
60. How do you load values from property files?
61. What does the @Valid as part of JSR-303 mean?
62. What is the role of the @PostConstruct and @PreDestroy annotations?
63. Which of the following is BAD practice, in general?
64. Which of the following best describes @Order annotation?
65. Which is an embedded database supported by Spring?
66. Which of the following is an advantage of using Spring's transaction management?
67. What is the default scope of a Spring bean?
68. In Spring MVC, what is responsible for handling HTTP requests and responses?
69. What are the different types of bean injection?
70. Exceptions thrown by the Spring DAO classes are subclasses of which?
71. True or False? Spring supports joda-time.
72. What is the @Valid annotation used for?
73. What does the ${...} placeholder usually signify?
74. If a Spring bean implements BeanFactoryAware, which method is called with the bean instance?
75. Spring's caching support does what?
76. Which of the following correctly describes JobLauncher?
77. Spring's JdbcTemplate is central class to interact with a database through JDBC. How can it be created?
78. How does Spring handle XML marshalling/unmarshalling?
79. Which of the following annotations can be used to declare a bean in Spring?
80. By default when singleton bean is instantiated?
81. How can you instantiate BeanFactory?
82. To enable MVC Java config, @EnableWebMvc should be used with which of following annotation?
83. Which of these is NOT a Spring Bean Scope?
84. Imagine I have multiple classes that have similar properties; what's a good way of handling this situation without copy/pasting the bean definitions?
85. True or False? Spring Integration is a part of the Spring framework you must use if you want to use beans.
86. True or False - @Inject is part of Spring Framework
87. Which of the following is NOT a method of using transactions in Spring?
88. Which if the most common scope for DAO beans?
89. Which of these is NOT a Spring annotation?
90. In "<property name="initialShapeSeed" value="#{ numberGuess.randomNumber }"/>", what is the name of the notation used to define the value of the property?
91. How do you refer to a collection in a Spring bean definition?
92. Which of the following statements BEST describes Spring Bean Factory?
93. What is JdbcTemplate used for?
94. Which of the following is an INVALID @RequestMapping declaration?
95. What does 'wiring' the beans do?
96. Which of the following is NOT a valid spring bean scope?
97. DispatcherServlet class follows which design pattern?
98. Which of the following is NOT an Autowire type?
99. Which of the following is NOT a way that weaving can be used?
100. Which one of the following statements is NOT true?
101. Which one of the following statements is NOT true about Validation API?
102. Which of the of the following is not a wiring mode supported by Spring?
103. Which one of the following is NOT true about Global Transactions?
104. True or false? Spring's DAO classes translate SQL exceptions into general Spring exceptions
105. What will happen if you annotate a setter method with @Required without wiring a bean?
106. If a Spring bean implements BeanNameAware, which method is called with the bean id?
107. Which one of the following is not TRUE about Spring MVC and Ajax
108. Which one of the following statements is NOT true about transactions?
109. What is the @PersistenceContext annotation used for?
110. Which of the following is NOT a valid spring Application Context implementation?
111. Which Spring MVC annotation is NOT valid for use in a method?
112. Which of the following is the right way to pass part of URL(user) as input to the request handler method?
113. Which one of the following statements is true:
114. What is the primary use of Inversion of control?
115. Which of the following is NOT a valid advice?
116. Which is NOT a valid form of Advice in AOP?
117. Which of the following statements is NOT true about the @Autowired annotation?
118. Which of the following is a disadvantage of using interfaces for proxies?
119. Which of these is NOT a valid implementation of ApplicationContext?
120. What class is used to determine data binding errors, such as those during POST operations?
121. Which of the following object hold the information of principal currently using the application?
122. Which one of the following statements is NOT true about the following configuration in security.xml <http ...> … <form-login login-page="/login/form" login-processing-url="/login" username-parameter="username" password-parameter="password" authentication-failure-url="/login/form?error"/> </http>
123. Which of the following correctly describes TestContextManager of Spring TestContext Framework?
124. Which is NOT a valid way of injecting a Collection in Spring?
125. Which of the following Design Patterns is the common solution for the duplicated form submission problem in Spring MVC?
126. Which of the following is NOT true about Spring Web Services?
127. Which one of the following statements is NOT true about Spring testing annotation?
128. How do you declare a destroy method in a Spring bean?
129. Which of the following is NOT a way to use Spring Web MVC's asynchronous request processing?
130. Which of the following is NOT a valid spring framework module?
131. Which view technologies does Spring Web MVC NOT support out of the box?
132. Which one of the following statements is NOT true about the Application Context.
133. Which of the following utility classes provides functionality to set a non-public field or invoke a non-public setter method when testing application code?
134. Which one of the following statements is NOT true about the following code: @Service("jpaStudentService") @Repository @Transactional public class StudentServiceImpl implements StudentService { private Log log = LogFactory.getLog(StudentServiceImpl.class); @PersistenceContext private EntityManager em; // Other code omitted }
135. What are benefits of transactions for Hibernate?
136. BeanFactory is a popular way to wire beans in Spring, which is a correct way of creating a BeanFactory?
137. Which one of the following statements is NOT true about @Transactional attributes
138. Which of the following is NOT true about Spring transaction management?
139. How do you specify outgoing HTTP content-type?
140. How do you specify the incoming HTTP content-type?
141. Which of the following identify the application-wide permissions available to a principal?
142. Which of the following best describes the utility of @RunWith(SpringJUnit4ClassRunner.class)?
143. What is the @BeforeTransaction annotation used for?
144. What is the purpose of the SessionStatus.setComplete()?
145. If you don't want a method to be enlisted in a transaction at all, what type of attribute can be used?
146. Which of the following is not a VALID mode of autowiring
147. Which of the following is FIRST step in user authentication process?
148. How can we create a PreparedStatementCreator?
149. Which of the following are valid approaches for integration Struts with Spring?
150. A RowCallbackHandler has one method called?
151. Which of the following is a VALID Spring form taglib declaration?
152. Which of the following is incorrect?
153. Which of the following methods are needed for loading a database driver in JDBC?
154. Which of the following annotation enables default data conversion in Spring Web MVC?
155. In transactions and exception management, what is the default rollback policy?
156. In Spring and Hibernate integration, which is the correct implementation of the Session Factory?
157. True or False? @PathVariable is used on classes to indicate they will be used as handlers if a variable is found.
158. Which of the following best describes Spring Batch?
159. Spring - WS Core is NOT dependent on which of the following modules?
160. Are Spring singleton beans thread-safe?
161. Which one of the following is NOT true about HibernateDaoSupport Class
162. Which of the following statements is NOT true when defining the <intercept-url> elements in security.xml?
163. Which one of the following is NOT true about Spring MVC View resolver
164. Which one of the following is NOT true about the followng code: @Controller @RequestMapping("/reservationForm") @SessionAttributes("reservation") public class ReservationFormController { ... @RequestMapping(method = RequestMethod.POST) public String submitForm(@ModelAttribute("reservation") Reservation reservation, BindingResult result) { ... return "redirect:reservationSuccess"; } ... }
165. Which of the following is the most commonly used view resolver for integrating JSPs with Spring?
166. Which of the following is a common cross-cutting concern?
167. <concurrency-control> element can be used for which of the following purposes?
168. Which one of the following statements is true about the propagation attributes that can be defined in @Transactional annotations?
169. Which one of the following statements is NOT true about Spring Web Flow states?
170. Which one of the following statements is NOT true about <mvc: annotation-driven>:
171. Which of the following scopes is valid ONLY in the context of a web-aware Spring ApplicationContext?
172. Which of the following is NOT an advantage of SimpleJdbcTemplate?
173. Which of the following is a valid usage of Method Injection in spring?
174. Which of the following is NOT a feature of Spring Security 3.x
175. What are the features of the XML <context: namespace?
176. What is the @WebAppConfiguration annotation used for?
177. Which of the following implementation provides the mechanism for JSF and Spring integration?
178. A SQLProvider has one method called?
179. Spring MVC annotation can be used to perform:
180. Which of the following is a VALID way of implementing Programmatic Transactions in Spring
181. Which of the following development styles are supported by Spring WS?
182. Which of the following is NOT a filter type in <context:component-scan> element?
183. When are proxies generated in the Spring lifecycle?
184. Which one of the following statements is true about the following configuration in web.xml: <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class> org.springframework.web.filter.DelegatingFilterProxy </filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/myapplication/*</url-pattern> </filter-mapping>
185. How can you find out about the current content when an aspect is invoked?
186. Which the following statements is true about Spring validation?
187. When detecting a Device device in a @Controller in Spring MVC, which of these is NOT supported?
188. Which of these is correct when creating an ApplicationContext?
189. How filters are used in Spring Web?
190. How is a resource defined in the context of a REST service?
191. Which of these is a valid Advice annotation?
192. What does a ViewResolver do?
193. How are Spring Data repositories implemented by Spring at runtime?
194. What is SpEL and how is it used in Spring?
195. The process of linking aspects with other objects to create an advised object is called
196. How are JDK Dynamic proxies and CGLIB proxies used in Spring?
197. Which of these is not a valid method on the JoinPoint interface?
198. In what order do the @PostConstruct annotated method, the init-method parameter method on beans and the afterPropertiesSet() method execute?
199. What is the function of the @Transactional annotation at the class level?
200. What is the root interface for accessing a Spring bean container?
201. Which annotation can be used within Spring Security to apply method level security?
202. What is the purpose of the @Lazy annotation and why would you use it?
203. What is dependency injection?
204. What is a RESTful web service?
205. What happens when a class is annotated with the @Controller annotation?
206. Which property can be used to change the port of a Spring application?
207. What is the purpose of the @ResponseBody annotation?
208. How are mocking frameworks such as Mockito used with Spring?
209. What is the name of the central servlet that dispatches requests to controllers?
210. What is the purpose of the Spring IoC (Inversion of Control) container?
211. What is component scanning?
212. What does @SpringBootApplication do?
213. How does Spring Data facilitate queries against a datastore?
214. What is the delegating filter proxy?
215. What value does Spring Boot Actuator provide?
216. What is the purpose of the @ContextConfiguration annotation in a JUnit Test?
217. How are authentication and authorization different?
218. What is the purpose of the @RequestBody annotation?
219. What is the DispatcherServlet and what is its function?
220. What is Spring Boot autoconfiguration?
221. Which are valid steps to take to enable JPA in Spring Boot?
222. What is a transaction in the context of Spring Data?
223. Modularization of a concern that cuts across multiple classes is known as a(n)____.
224. How do you inject a dependency into a Spring bean?
225. What is a bean in the context of Spring?
226. Which property is given precedence by Spring?
227. What Spring Boot property is used to set the logging level for the entire application in the application.properties file?
228. What is a Spring bean uniquely identified?
229. What is the difference between a JAR and a WAR distribution in Spring Boot?
230. How does the transaction propagation setting impact the behavior of transactions?
231. To register a custom filter that applies only to certain URL patterns, you should remove the _ annotation from the filter class and register a @Bean of type _ in Spring @Configuration.
232. What is the purpose of a web application context?
233. What is Spring AOP?
234. Assuming username and password authentication is in place, what method on the Authentication object can be used to obtain the username?
235. Assuming no additional configuration is provided, what is the first selection criteria Spring uses to choose a bean when autowiring a property?
236. What is a security context?
237. How might you map an incoming request to a controller method?
238. What pattern does Spring MVC implement to delegate request processing to controllers?
239. What methods does the Pointcut expression below reference? execution(* setter*(..))
240. What is the output from invoking this Actuator endpoint in an unmodified Spring Boot application generated using Spring Intializr? /shutdown
241. How can you access the application context in a Spring integration test?
242. What interface can be specified as a parameter in a controller method signature to handle file uploads?
243. What property can be used to set the active Spring profiles