Announcement Announcement Module
Collapse
No announcement yet.
@AnnotationDrivenConfig not found Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • @AnnotationDrivenConfig not found

    Hello,

    where can i find @AnnotationDrivenConfig. Perhaps i have to include some JARS?

    hier is my maven:

    Code:
    <dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-webmvc</artifactId>
    			<version>${org.springframework-version}</version>
    		</dependency>
    		
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-orm</artifactId>
    			<version>${org.springframework-version}</version>
    		</dependency>
    			
    		<!-- SPRING_Test -->
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-test</artifactId>
    			<version>${org.springframework-version}</version>
    			<scope>test</scope>
    		</dependency>

  • #2
    There is no such annotation... So you will not find it anywhere...

    Comment


    • #3
      Originally posted by Marten Deinum View Post
      There is no such annotation... So you will not find it anywhere...
      http://static.springsource.org/sprin...l/ch06s02.html

      there are a lot of tutorials using @AnnotationDrivenConfig but i will find it anywhere... ahmmm... ok....

      Comment


      • #4
        That is t he old java-config project and that has been abondoned and incorporated (in a different and better form) in Spring itself. So basically those tutorials are garbage...

        Comment


        • #5
          ok thanks for your reply.

          im trying to configure my mvc project without XML. is it possible to replace <context:annotation-config/> by any Annotation.
          I would like to dispense with servlet-context.xml and root-context.xml altogether, is it possible?

          Comment


          • #6
            That is all explained in the reference guide (chapter 3 if I recall correctly)... Use the AnnotationConfig(Web)ApplicationContext and put your configuration in @Configuration annotated classes each bean is a method annotated with @Bean. (that is about it in a nutshell).

            Shameless plug my book uses mostly java based configuration (we needed the xml part for Web Flow and Spring Security as those haven't picked up the new @Configuration style yet).

            Comment

            Working...
            X