ActionのPOJO化


public interface EchoAction {
String echo();
}

public class EchoActionImpl implements EchoAction {

public EchoActionImpl() {
}

public String echo() {
return "success";
}

}

こんな感じで、ActionのPOJO化をした。とりあえず、画面遷移までは確認済み。
インターフェースに存在するメソッドを呼び出して、戻り値は、文字列。(ストリーム使う場合は、voidでも、return nullでも)
メソッドが幾つかある場合は、MappingDispatchActionと同じ仕組みで、メソッドを指定可能。


残作業は、いろいろ。(w


追記StrutsのActionクラスとの共存も可。