Spring Framework

Spring Framework Practice Test

0%

What is the meaning of spring?

Correct! Wrong!

Explanation:
Spring is an open source corporate Java development framework.

Spring is licensed under a

Correct! Wrong!

Explanation:
The Spring Framework is a Java platform that is free and open source. Rod Johnson wrote it originally, and it was distributed under the Apache 2.0 license in June 2003. When it comes to size and transparency, spring is little and transparent. Spring framework's basic version is about 2MB in size.

In Spring, what are the IoC containers?

Correct! Wrong!

Explanation:
In Spring, the BeanFactory and ApplicationContext classes serve as IoC containers.

Spring has been created by

Correct! Wrong!

Explanation:
Pivotal Software, Inc. was a San Francisco-based international software and services firm that specialized in cloud platform hosting and consulting. Pivotal has been a part of VMware since December 2019.

What is the scope of a request?

Correct! Wrong!

Explanation:
The'request' scope defines a single bean definition that is contained within a single HTTP request. This means that a fresh bean instance is created for each HTTP request. Only in the context of a web-aware ApplicationContext is this scope usable.

Dependent injection, often known as IOC, is a.. .

Correct! Wrong!

Explanation:
The correct answer
Design Pattern

Which of the following is a suitable replacement for Spring HibernateTemplate?

Correct! Wrong!

Explanation:
Contextual sessions in Hibernate are an alternative to Spring HibernateTemplate.

What is autowiring Which of these isn't a Spring Module?

Correct! Wrong!

Which of these isn't a Spring Module?

Correct! Wrong!

Explanation:
JSP creates a dynamic interface for constantly changing data, as well as dynamically invoking server actions. HTML allows you to describe the structure of text-based information in a document in great detail.

After shutting the spring container, which of the following methods is used to gently end all bean processes?

Correct! Wrong!

Explanation:
shutdownHook is used to gracefully shutdown all the bean processes after closing the spring container

What are the different types of advice?

Correct! Wrong!

Explanation:
The five forms of advise that spring supports are before, after, after-returning, after-throwing, and around.

Which of the following statements is correct?

Correct! Wrong!

Explanation:
The correct answer
ApplicationContext extends BeanFactory

What is the scope of a bean in the context of a portlet?

Correct! Wrong!

Explanation:
The lifecycle of a global HTTP Session is scoped by a single bean specification. When used in a portlet context, it is usually only valid. Only in the context of a web-aware Spring ApplicationContext is this value valid.

What is the definition of the Join Point?

Correct! Wrong!

Explanation:
A join point is a location in your application where you can add AOP aspects

By default, beans defined in the spring framework are..

Correct! Wrong!

Explanation:
The singleton pattern is a software design pattern that limits the number of instances of a class to one. This is beneficial when only one item is required to coordinate system-wide actions.

Is it possible to integrate Struts and Spring?

Correct! Wrong!

Explanation:
Yes, we can.

Which version of the spring framework introduced the Expression Language/ SpEL?

Correct! Wrong!

Explanation:
SpEL (Spring Expression Language) was introduced in version 3.0 of the spring framework

What are the various kinds of bean injections?

Correct! Wrong!

Explanation:
The correct answer
constructor and setter

What are the ways to use Spring to access Hibernate?

Correct! Wrong!

Explanation:
Hibernate may be accessed in two ways: inversion of control with a Hibernate Template and Callback, or by extending HibernateDAOSupport and adding an AOP Interceptor node.

What are the different types of autowire?

Correct! Wrong!

Explanation:
The correct answer
byName , byType, constructor and autodetect

Before the initialization callback, which method is used to process the bean?

Correct! Wrong!

Explanation:
The method postProcessBeforelnitialization() is used to process data that has already been initialized. callback for initialization

The following class can be used to build a custom spring event.

Correct! Wrong!

Explanation:
Application Events are handled by any component have handler defined for event.These events are essentially a traditional publish-subscribe model.

Which tag is permitted by the static field?

Correct! Wrong!

Explanation:
The static field also permits the use of the util:constant tag.

Which element is used to specify bean method access attributes?

Correct! Wrong!

Explanation:
For bean methods, securitytprotect is used to specify access attributes.

The PostageServiceBean has an annotation that decorates it.

Correct! Wrong!

Explanation:
Interceptors are an important feature of most programming paradigms because they allow programmers to control execution by intercepting it. Spring framework also includes a number of interceptors that can be used for various reasons. Interceptors that implement the ClientHttpRequestInterceptor interface can be added to the Spring RestTemplate.