Results 1 to 6 of 6

Thread: @AnnotationDrivenConfig not found

  1. #1

    Default @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>
    Spring!! New Version -> New Tutorial

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    There is no such annotation... So you will not find it anywhere...
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default

    Quote 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....
    Spring!! New Version -> New Tutorial

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    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...
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  5. #5

    Default

    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?
    Spring!! New Version -> New Tutorial

  6. #6
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    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).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •