Login
Sign up
Categories
IT & Programming
Design & Multimedia
Writing & Translation
Sales & Marketing
Admin Support
Engineering & Manufacturing
Finance & Management
Website Designing & Development
Database Management
Networking & Troubleshooting
Aviation & Aerospace
Softwares & Applications
Stocks & Investments
Electronics & Appliances
Online Tools
General Knowledge & Aptitude
Mathematics
Educational Subjects & Courses
Business & Organization
Health & Wellbeing
Culture & Ethics
IT Field Knowledge & Experience
Languages & Communication
Entrepreneurship & Leadership
Economics & Development
Mass Communication & Media
Research Methods & Evaluation
Public Relations & Dealings
Educational Methods and Research
Educational Subjects & Techniques
Crime & Justice
Governments & Policies
Cyber Security & Ethical Hacking
Hospitality & Tourism
Soft Skills & Personal Management
Transportation & Driving Rules
Forest and Nature
Religion
Skill Assessment
MCQs
PDFs
Login
Sign up
Categories
IT & Programming
Design & Multimedia
Writing & Translation
Sales & Marketing
Admin Support
Engineering & Manufacturing
Finance & Management
Website Designing & Development
Database Management
Networking & Troubleshooting
Aviation & Aerospace
Softwares & Applications
Stocks & Investments
Electronics & Appliances
Online Tools
General Knowledge & Aptitude
Mathematics
Educational Subjects & Courses
Business & Organization
Health & Wellbeing
Culture & Ethics
IT Field Knowledge & Experience
Languages & Communication
Entrepreneurship & Leadership
Economics & Development
Mass Communication & Media
Research Methods & Evaluation
Public Relations & Dealings
Educational Methods and Research
Educational Subjects & Techniques
Crime & Justice
Governments & Policies
Cyber Security & Ethical Hacking
Hospitality & Tourism
Soft Skills & Personal Management
Transportation & Driving Rules
Forest and Nature
Religion
Skill Assessment
MCQs
PDFs
Login
Sign up
Skill Assessments
>
IT & Programming
>
Spring Framework Skill Assessment
>
Quiz # 4
Spring Framework Quiz # 4
Instructions
Quiz:
Spring Framework Quiz # 4
Subject:
Basic Spring Framework
Total Questions:
30 MCQs
Time:
30 Minutes
Note
Do not refresh the page while taking the test.
Results along with correct answers will be shown at the end of the test.
Start Quiz
Spring Framework Quiz # 4
End Quiz
Question
1
of 30
00:00
How do you refer to a collection in a Spring bean definition?
<list> <ref bean="one" /> </list>
<list> <reference bean="one" /> </list>
<lists> <ref bean="one" /> </lists>
None of these
Which of the following statements BEST describes Spring Bean Factory?
Spring Bean Factory provides a means for resolving text messages, including support for i18n of those messages, provide generic way to load file resources
Spring Bean Factory creates association between collaborating objects as they are instantiated but does NOT publish events to beans that are registered as listeners
Spring Bean Factory creates association between collaborating objects as they are instantiated and publish events to beans that are registered as listeners
Spring Bean Factory does NOT create association between collaborating objects as they are instantiated and does NOT publish events to beans that are registered as listeners
What is JdbcTemplate used for?
executing SQL statements against the database
configuring JDBC
configuring the connection pool using defaults
Which of the following is an INVALID @RequestMapping declaration?
@RequestMapping(method = RequestMethod.POST)
@RequestMapping(request = RequestMethod.GET)
@RequestMapping(value = { "/" }, headers = "Accept=text/html")
@RequestMapping(method = RequestMethod.GET)
What does 'wiring' the beans do?
Sends parameters to constructor of bean.
Sends list parameters.
Uses beans from an XML file.
Creates a referral to other beans.
Which of the following is NOT a valid spring bean scope?
prototype
singleton
globalSession
localSession
DispatcherServlet class follows which design pattern?
Template
Abstract factory
Singleton
Factory
FrontController
Which of the following is NOT an Autowire type?
byType
autodetect
Constructor
byName
byselector
Which of the following is NOT a way that weaving can be used?
web service
compile-time
runtime
class-load time
Which one of the following statements is NOT true?
@ModelAttribute can be used on methods in a controller
@ModelAttribute can be used on method parameters in a controller
@Value annotation can be used on a field
@Value annotation can be used on a class
Which one of the following statements is NOT true about Validation API?
In Spring MVC web application context configuration <tx:annotation-driven/> will configure Spring to automatically enable the JSR-303 Bean Validation in Spring.
JSR-303 provides a standard validation API that hides the underlying provider
In Spring MVC web controller, you can annotate the argument in a method with the @Valid annotation.
JSR-303 is a JEE standard and is broadly supported by many frontend/backend frameworks
Which of the of the following is not a wiring mode supported by Spring?
by constructor
by property
by type
by name
Which one of the following is NOT true about Global Transactions?
In Java JTA is the only way to implement global transaction.
In Java, JTA is the standard for implementing global transactions
Global transactions are transactions that span multiple backend resources.
One of global transaction characteristics is to maintain atomicity, which means either all or none of the involved resources are updated.
True or false? Spring's DAO classes translate SQL exceptions into general Spring exceptions
True
sometimes True
FALSE
What will happen if you annotate a setter method with @Required without wiring a bean?
An exception is launched
The required bean is set to null
Spring will create the bean for you
Nothing happens
If a Spring bean implements BeanNameAware, which method is called with the bean id?
setId()
setBeanName()
setBean()
setName()
Which one of the following is not TRUE about Spring MVC and Ajax
The controller handles the request and the response data will be formatted and sent to browser.
@ResponseBody annotation instruct spring to serialize the returned object to a specific format.
In a Ajax call, a XMLHttpRequest is prepared and submitted to the server.
In order for view to be updated properly.The format of the data has to be in JSON
Which one of the following statements is NOT true about transactions?
Declarative transaction management is achieved by separating transaction management code from your business methods via declarations.
Programmatic transaction management is achieved by embedding transaction management code in your business methods to control the commit and rollback of transactions.
When managing transactions declaratively, you have to include transaction management code in each transactional operation
Transaction management, as a kind of crosscutting concern, can be modularized with the AOP approach.
What is the @PersistenceContext annotation used for?
injecting a Spring application context used by the ORM framework
injecting a JPA entity manager
Hibernate configuration
Which of the following is NOT a valid spring Application Context implementation?
FileSystemXmlApplicationContext
ConfigurableApplicationContext
ClassPathXmlApplicationContext
XmlWebApplicationContext
Which Spring MVC annotation is NOT valid for use in a method?
@RequestParameter
@RequestMapping
@ResponseBody
@RequestParam
Which of the following is the right way to pass part of URL(user) as input to the request handler method?
@RequestMapping("display/{user}") public String removeMember(@PathVariable("user") String user) {}
@RequestMapping(value ="display/user") public String removeMember(@PathVariable("user") String user) {}
@RequestMapping("display/{user}") public String removeMember(@RequestParam("user") String user) {}
Which one of the following statements is true:
@RequestMapping can only be used on method
The default value for the method attribute of @RequestMapping is POST
@Conroller annotation can be used on both class and method
@RequestParam annotation helps assigning the request parameter value to the method parameter.
What is the primary use of Inversion of control?
For additional security
For loose coupling
All of above
For better memory management
Which of the following is NOT a valid advice?
After returning advice
Before advice
Before throwing advice
After throwing advice
Which is NOT a valid form of Advice in AOP?
Before advice
After returning advice
After throwing advice
Before throwing advice
After (finally) advice
Which of the following statements is NOT true about the @Autowired annotation?
@Autowired annotation was enabled with the <context:annotation-config> element
@Autowired annotation can be applied on more than one properties in the same class
@Autowired annotation can be applied on more than one constructor method in the same class
@Autowired annotation can be applied on more than one setter method in the same class
Which of the following is a disadvantage of using interfaces for proxies?
proxy won't be called if one method calls another inside the proxy
it's slower
cannot use Hibernate
generates classes at runtime
Which of these is NOT a valid implementation of ApplicationContext?
WebXmlApplicationContext
ClassPathXmlApplicationContext
FileSystemXmlApplicationContext
BeanFactoryApplicationContext
What class is used to determine data binding errors, such as those during POST operations?
ParsingErrors
BindingErrors
BindingResult
ParsingResult
Submit Test
Prev Question
ABCd
Next Question
Spring Framework Skill Assessment
Login to see Skill Score (It's Free)
Your Skill Level:
Poor
Retake Quizzes to improve it
Start Assessment
Spring Framework Skill Assessment
Login to see Skill Score (It's Free)
Your Skill Level:
Poor
Retake Quizzes to improve it
Start Assessment