Olete.in
Articles
Mock Tests
🧪 Spring MCQ Quiz Hub
Spring Mcq Set 3
Choose a topic to test your knowledge and improve your Spring skills
1. Applying aspects to your target objects
AspectJ Annotation
Weaving
All of the mentioned
none of the mentioned
2. What are the ways to declare an advice?
pointcut-ref attribute
pointcut attribute
all of the mentioned
none of the mentioned
3. What are the ways to declare an advice?
pointcut-ref attribute
pointcut attribute
all of the mentioned
none of the mentioned
4. What are the ways to declare an advice?
pointcut-ref attribute
pointcut attribute
all of the mentioned
none of the mentioned
5. Special compiler used during weaving
jvm
gcc
ajc
none of the mentioned
6. Name of the process when targe classes are loaded into JVM
load-time weaving
process-time weaving
load-process weaving
process-delivery weaving
7. How to weave your classes using argument while compiling?
-javaagent:CLASSPATH
-javaagent:PackgePath
-javaweave:CLASSPATH
-javaweave:PackagePath
8. XML Element to include load-time weaver
aop:config
aop:auto-wire
context:load-time-weaver
aop:load-time-weaver
9. You also have to include suitable load-time weaver’s configuration in XML
True
False
error
none of the mentioned
10. Library to use AspectJ weaver
spring-instrument.jar
spring-introduction.jar
spring-aop.jar
spring-weave.jar
11. Objects created outside the container:-
Domain Objects
User Objects
SpringVisitor Objects
none of the mentioned
12. How to inject Spring bean into domain objects
AOP
XML
AspectJ
Java Based
13. We can directly use Spring AOP for injection of beans
True
False
error
None of these
14. Which scope does @Configurable instantiated class looks for?
Singleton
Prototype
None of the mentioned
all of the mentioned
15. Spring includes AnnotationBeanConfigurerAspect in its aspect library for configuring the dependencies of any objects
True
False
error
None of these
16. Scripting languages supported by Spring?
JRuby
Groovy
BeanShell
all of the mentioned
17. Scripting language based on Ruby
JRuby
Groovy
BeanShell
all of the mentioned
18. Dynamic Language for java platform to cope up with other languages
JRuby
Groovy
BeanShell
all of the mentioned
19. Lightweight java scripting language executing java fragments
JRuby
Groovy
BeanShell
all of the mentioned
20. In Ruby instance variable begins with
#
*
@
none of the mentioned
21. XML Element to declare a bean implemented by JRuby
lang:jruby
aop:jruby
beanscript:jruby
script:jruby
22. XML element to specify the property values for scripting bean
lang:property
bean:property
script:property
none of the mentioned
23. XML Element to declare a bean implemented by Groovy
lang:groovy
lang:jruby
beanscript:jruby
script:jruby
24. Script’s location is specified by attribute
script-source
xml-source
script-annotation
none of the mentioned
25. Interface used to create additional features in groovy based beans
GroovyObjectCustomizer
GroovyBeanCustomizer
GroovyCustomizer
None of the mentioned
26. XML Element to declare a bean implemented by JRuby
lang:bash
aop:bash
lang:bsh
script:bash
27. Attribute which specifies all the interfaces
script-interfaces
lang:bsh
lang:script
script:bsh
28. Class-based proxies are best way to advise scripted beans
True
False
error
none of the mentioned
29. Element which allows you to control the scope
lang:jruby
lang:language
lang: bsh
lang:groovy
30. BeanShell Library dependencies
bsh-2.0b4.jar
cglib-nodep-2.1_3.jar
all of the mentioned
none of the mentioned
31. Attribute used by Spring to refresh beans
refresh-check-interval
refresh-check-delay
refresh-delay
none of the mentioned
32. Spring IoC container refreshes the script periodically according to the interval period specified
True
False
error
None of these
33. Default value of refresh-check-delay attribute
Zero
Negative
Positive
None of the mentioned above
34. XML Element to define an inline script
lang:inlinescript
lang:inline_script
lang:inline@script
lang:inline-script
35. Refresh checking feature is not applicable for an inline script
True
False
error
None of these
36. To prevent the characters in your script from conflicting with the reserved XML characters
Use ![CDATA[…]] tag
Use ![DATA[…]] tag
Use ![CDATA(…)] tag
none of the mentioned
37. Dynamic-language-backed bean with some configurations
Refreshable bean
Beanshell
Scripting Beans
Inline Script
38. To quickly add a Spring Validator implementation to a Spring MVC Controller
Use inline-script
lang:inline-script
All of the mentioned
None of the mentioned
39. Spring can detect and refresh changes from the script source files.
True
False
error
None of these
40. Way to secure web app’s URL.
servlet filters
refresh-check-delay
http servlet filters
none of the mentioned
41. Servlet filter registered in web deployment descriptor, which filters request in spring application context.
DelegatingFilter
DelegatingFilterProxy
DelegatingProxy
none of the mentioned
42. Servlet APIs to access security information of web application.
HttpServletRequest.isUserInRole()
HttpServletRequest.getUserPrincipal()
None of the mentioned
All of the mentioned
43. To load root application context at the start up.
ContextListener
ContextLoader
ContextLoaderListener
ContextEventListener
44. To dispatch requests for web application.
DispatcherServlet
ViewHandler
ViewResolver
none of the mentioned
45. The responsibility of DelegatingFilterProxy is simply to delegate HTTP request filtering to a Spring bean that implements the interface:-
java.util.logging.Filter
java.util.logging.net
java.util.logging.FilterHttp
none of the mentioned
46. By default, DelegatingFilterProxy delegates to a bean whose name is the same as its filter-name property.
True
False
error
none of the mentioned
47. Filter chain configured by Spring security, when web app security enabled.
springSecurityFilterChain
delegatingFilterProxy
none of the mentioned
all of the mentioned
48. The http auto-config=”false” element automatically configures the basic security services that a typical web application needs.
True
False
error
None of these
49. Element used to restrict access to a particular URL.
restrict-url
intercept-url
intercept-restrict
none of the mentioned
50. Element which configures authentication services.
authentication-provider
authentication-manager
all of the mentioned
none of the mentioned
Submit