Announcement Announcement Module
Collapse

JavaConfig forum decommissioned in favor of Core Container

As described at

http://static.springsource.org/sprin...fig/README.TXT

key features of the Spring JavaConfig project have been migrated into the core Spring Framework as of version 3.0.

Please see the Spring 3.0 documentation on @Configuration and @Bean support:

http://static.springsource.org/sprin...tml#beans-java

For any questions related to @Configuration classes and @Bean methods in Spring 3.0, please post in the dedicated 'Core Container' forum at

http://forum.springsource.org/forumdisplay.php?f=26
See more
See less
TestContext Framework Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • TestContext Framework

    Hi ,
    1)What dependency (at the pom.xml) I have to refer in order to user the CustomContextLoader as the loader of the @ContextConfiguration ?
    2)What dependency (at the pom.xml) I have to refer in order to user the @RunWith annotation ?

    Regards.

  • #2
    Which ContextLoader are you wanting to use? Note that if you're using Spring 3.0, there is not (yet) a ContextLoader implementation dedicated to processing @Configuration classes. Follow SPR-6184 to be notified when this changes.

    To use the @RunWith annotation you need JUnit in your pom as shown here: http://mvnrepository.com/artifact/junit/junit/4.8.1

    Comment


    • #3
      @ContextConfiguration loader

      Hi Chris ,

      First thank you for your quick response ,I'm using Spring 3.0.1, I raised this question since I am using a class annotated with @Configuration and I wanted to load the context from this class .
      I wanted to believe :-) ,that since Spring 2.5.6 supported loading the Java context configuration by the JavaConfigContextLoader like here :
      Code:
      @ContextConfiguration(locations = {
              "com.tradefxl.integrationserver.test.TestsSpringConfiguration",
              "com.tradefxl.integrationserver.test" }, loader = JavaConfigContextLoader.class)
      I will be able to load my Java context configuration class (Since I am using a newer version/release of Spring and I assumed it will have a similar but better features , my mistake...)

      Thanks again.
      Regards.

      Comment


      • #4
        Spring for test framework

        Hi Chris,
        At the previous version (2.5.6) we used a the Java config framework to configure Spring . we used Spring for test framework as well based on the JavaConfigContextLoader.
        Is there any alternative in Spring 3.0.1 ? (I understood from your previous message that there isn't ), If there is not , when it will be available ?

        Thanks again.
        Regards.

        Comment

        Working...
        X