samples/componentinjection/anagram-modular/src-app-spring-scan/org/apidesign/anagram/app/springscan/AnagramsAnnotated.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 10:08:18 +0200
changeset 246 128db998ee1c
parent 245 ce3b323add40
permissions -rw-r--r--
Merge: Work done on the spring and lookup is not in trunk
     1 package org.apidesign.anagram.app.springscan;
     2 
     3 import org.apidesign.anagram.api.Scrambler;
     4 import org.apidesign.anagram.api.WordLibrary;
     5 import org.apidesign.anagram.gui.AnagramsWithConstructor;
     6 import org.springframework.beans.factory.annotation.Autowired;
     7 import org.springframework.stereotype.Service;
     8 
     9 /* This class shall be in its own module, not here, but because of the need
    10  * to see the @Service annotation, I've put it here. The right solution would
    11  * be to add dependency of the module providing super class on spring and
    12  * use the annotation directly there.
    13  */
    14 
    15 // BEGIN: anagram.spring.autowire.Anagrams
    16 @Service("ui")
    17 public class AnagramsAnnotated extends AnagramsWithConstructor {
    18     @Autowired
    19     public AnagramsAnnotated(WordLibrary library, Scrambler scrambler) {
    20         super(library, scrambler);
    21     }
    22 }
    23 // END: anagram.spring.autowire.Anagrams