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 # 3
Spring Framework Quiz # 3
Instructions
Quiz:
Spring Framework Quiz # 3
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 # 3
End Quiz
Question
1
of 30
00:00
What does the @Valid as part of JSR-303 mean?
input will be validated using registered validators for that type
sent to the database for constraint validation
uses Spring Security to validate security constraints
What is the role of the @PostConstruct and @PreDestroy annotations?
They are enterprise level constructors
You force in GC when something happens
None of these
Similar to init and destroy method
Which of the following is BAD practice, in general?
minimizing inter-dependencies between beans
continuous integration
all beans are prototype scope
Which of the following best describes @Order annotation?
Guides autowiring to be performed by means other than by type
Specifies the scope of a bean
Typically used to inject the properties of domain objects
Defines ordering as an alternative to implementing the org. springframework.core.Ordered interface
Which is an embedded database supported by Spring?
Oracle
MySQL
HSQL
PostgreSQL
Which of the following is an advantage of using Spring's transaction management?
can easily switch between JTA and regular transactions
you can customize the lifecycle
it's faster
forces you to use Hibernate
What is the default scope of a Spring bean?
Prototype
Abstract
None of these
Singleton
Session
In Spring MVC, what is responsible for handling HTTP requests and responses?
SpringController
DispatcherServlet
HttpServlet
RequestHandler
What are the different types of bean injection?
By constructor, By builder
By setter, By getter
By setter, By constructor ,By builder
By setter, By constructor
Exceptions thrown by the Spring DAO classes are subclasses of which?
DataException
DAOException
DataAccessException
AccessException
True or False? Spring supports joda-time.
FALSE
True
What is the @Valid annotation used for?
In tests to verify objects
Validating @Controller inputs
In mock objects
What does the ${...} placeholder usually signify?
value is a HTTP parameter
Java system property
property is read from a configuration file
If a Spring bean implements BeanFactoryAware, which method is called with the bean instance?
setInstance()
setBeanFactory()
setFactory()
setBeanInstance()
Spring's caching support does what?
abstracts a variety of different caching implementations
is not thread-safe
provides its own caching implementation
Which of the following correctly describes JobLauncher?
It provides parameters that are used by the JobInstance
It stores JobInstances and JobExecutions
It helps in launching a job and uses JobRepository to obtain a valid JobExecution
It represents a running instance of a Job
Spring's JdbcTemplate is central class to interact with a database through JDBC. How can it be created?
JdbcTemplate template = new JdbcTemplate(myDatabase);
JdbcTemplate template = new JdbcTemplate(myConnection);
JdbcTemplate template = new JdbcTemplate();
JdbcTemplate template = new JdbcTemplate(myDataSource);
How does Spring handle XML marshalling/unmarshalling?
provides its own fast, easy XML marshaller/unmarshaller
wraps a variety of libraries, including Jackson and JAXB
does not support marshalling/unmarshalling
Which of the following annotations can be used to declare a bean in Spring?
@Componet, @Controller, @Service, and @Repository
@Component, @Controller, and @Service
@Component
@Component and @Controller
By default when singleton bean is instantiated?
app context is created
when bean is accessed
in compile-time
How can you instantiate BeanFactory?
Using FileSystemXmlApplicationContext.
Using XmlFileApplicationContext.
Using ClassPathXmlApplicationContext.
Using FileSystemXmlApplicationContext or ClassPathXmlApplicationContext.
To enable MVC Java config, @EnableWebMvc should be used with which of following annotation?
@Resource
@Controller
@Configuration
@Componet
Which of these is NOT a Spring Bean Scope?
singleton
response
request
session
prototype
Imagine I have multiple classes that have similar properties; what's a good way of handling this situation without copy/pasting the bean definitions?
use bean inheritance
write some code
use AOP
write a custom BeanResolver
True or False? Spring Integration is a part of the Spring framework you must use if you want to use beans.
False
TRUE
True or False - @Inject is part of Spring Framework
True
False
Which of the following is NOT a method of using transactions in Spring?
proxies
declaratively
programmaticly
Which if the most common scope for DAO beans?
session
singleton
request
prototype
Which of these is NOT a Spring annotation?
@Component
@Controller
@Service
@View
@Aspect
In "<property name="initialShapeSeed" value="#{ numberGuess.randomNumber }"/>", what is the name of the notation used to define the value of the property?
DAO
SpEL
JSP
JSF
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