@ContextConfiguration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 9: Line 9:
=Overview=
=Overview=


@ContextConfiguration is a class-level annotation that can be used to configure the [[Spring_Framework_Testing_Concepts#TestContext|test context]] for Spring integration tests. @ContextConfiguration can be used to declare either path-based resource locations, via the locations() or value() attribute, or annotated classes, via the classes() attribute. Note, however, that most implementations of SmartContextLoader only support a single resource type.
@ContextConfiguration is a class-level annotation that can be used to configure the [[Spring_Framework_Testing_Concepts#TestContext|test context]] for Spring integration tests. @ContextConfiguration can be used to declare either path-based resource locations, via the locations() or value() attribute, or annotated classes, via the classes() attribute. Note, however, that most implementations of [https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/test/context/SmartContextLoader.html SmartContextLoader] only support a single resource type.

Revision as of 19:35, 23 November 2018

External

Internal

Overview

@ContextConfiguration is a class-level annotation that can be used to configure the test context for Spring integration tests. @ContextConfiguration can be used to declare either path-based resource locations, via the locations() or value() attribute, or annotated classes, via the classes() attribute. Note, however, that most implementations of SmartContextLoader only support a single resource type.