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:07:48 +0200
changeset 237 a84441ff1f73
parent 230 3282ef5328a8
child 245 ce3b323add40
permissions -rw-r--r--
Enough of spring
jtulach@230
     1
package org.apidesign.anagram.app.springscan;
jtulach@230
     2
jtulach@230
     3
import org.apidesign.anagram.api.Scrambler;
jtulach@230
     4
import org.apidesign.anagram.api.WordLibrary;
jtulach@230
     5
import org.apidesign.anagram.gui.AnagramsWithConstructor;
jtulach@230
     6
import org.springframework.beans.factory.annotation.Autowired;
jtulach@230
     7
import org.springframework.stereotype.Service;
jtulach@230
     8
jtulach@230
     9
/* This class shall be in its own module, not here, but because of the need
jtulach@230
    10
 * to see the @Service annotation, I've put it here. The right solution would
jtulach@230
    11
 * be to add dependency of the module providing super class on spring and
jtulach@230
    12
 * use the annotation directly there.
jtulach@230
    13
 */
jtulach@230
    14
jtulach@237
    15
// BEGIN: anagram.spring.autowire.Anagrams
jtulach@230
    16
@Service("ui")
jtulach@230
    17
public class AnagramsAnnotated extends AnagramsWithConstructor {
jtulach@230
    18
    @Autowired
jtulach@230
    19
    public AnagramsAnnotated(WordLibrary library, Scrambler scrambler) {
jtulach@230
    20
        super(library, scrambler);
jtulach@230
    21
    }
jtulach@230
    22
}
jtulach@237
    23
// END: anagram.spring.autowire.Anagrams