Choose a topic to test your knowledge and improve your Spring skills
The file which is the standard JPA configuration file to enable the Hibernate-based JPA implementation.
Spring application context, src/main/resources/META-INF/spring/applicationContext.xml consists of:-
Command to create a Spring MVC controller that provides a UI:-
To deploy the application to a web container:-
Spring Roo’s root folder (or any of the source packages) is:-
This encapsulates the context of a test’s execution:-
This manages a test context for a test and triggers test execution listeners:-
This defines a listener interface; by implementing this, you can listen to test execution events.
Spring provides convenient TestContext support classes for:-
JUnit 4 allows you to annotate your test methods with:-
Usually, a test and its target class are located in the same package, but the source files of tests are stored in a separate directory.
Method to perform cleanup tasks:-
The static assert methods is declared in the:-
Attribute which specifies the exception type:-
Test data sets are provided by data providers, which are methods with the:-
An object that simulates a dependent object:-
An Object which usually knows how its methods are expected to be called:-
Libraries that can help create mock objects:-
Test used to test several units in combination as a whole.
Spring supports web controller testing by providing Servlet API:-
Base class to access the managed application context through the inherited getApplicationContext() method.
The TestContext framework provides two test execution listeners related to context management:-
Interface which can provide access to the managed application context through the protected field applicationContext:-
In JUnit 4, you can simply run your test with the test runner SpringJUnit4ClassRunner.
Method to indicate that the application context is dirty.
In JUnit4, to explicitly specify a Spring-specific test runner for running your test.
Annotation for SpringJUnit4ClassRunner:-
This class implements the ApplicationContextAware interface, so you can get access to the managed application context:-
AbstractJUnit38SpringContext class also implements the ApplicationContextAware interface.
Spring JUnit 3 legacy support in releases prior to 2.5, your test class can extend the:-
AbstractDependencyInjectionSpringContextTests supports dependency injection.
Test fixtures injected from the managed application context by annotating:-
TestContext support class AbstractJUnit4SpringContextTests, you can also have test fixtures injected from the managed application context.
Starting from Spring 2.5, the TestContext framework provides a test execution listener related to transaction management:-
Annotation for TransactionalTestExecutionListener:-
DispatcherServtlet dispatches portlet requests to appropriate handlers that handle the requests.
Maps each request to a handler through one or more handler mapping beans.
In portlets, there are URLs:-
When a user triggers a render URL, the portlet container will ask all the portlets in the same page to handle a render request to render its view.
When a user triggers an action URL in a portlet, the portlet container will first ask the target portlet to handle an action request.
After Controller has finished handling a render request, it returns:-
DispatcherPortlet resolves a view name from one or more view resolver beans.
portlet deployment descriptor file is:-
Servlet Listener to load the root application context at startup.
Unlike in a web application, you can’t control URLs directly in a portlet.
You can chain multiple handler mapping annotations as required to portlet.
The preceding controller handles portlet requests:-
When handling a render request, it gets the time zone attribute from the portlet preference.
When handling an action request, it gets the time zone parameter from the portlet request.
The submission URL of this form should be a portlet action URL that will trigger an action request to the current portlet.