<div>$B2r$G$9(B<br> $B$$$D$b$*@$OC$K$J$F$*$j$^$9!#(B<br> public class LoginAuthInterceptor extends AbstractInterceptor {<br><br> private MessageDao messageDao;<br><br>// setter$B>JN,(B<br><br>public Object invoke(MethodInvocation invocation) throws Throwable {<br>
// $B0J2<!$>JN,(B<br><br>}<br><br> $B0J>eJ}K!$N$h$&$JMxMQ$9$k$H!"(Bjava.lang.NullPointerException$B$r=P$9!#(B<br><br>public class LoginAuthInterceptor extends AbstractInterceptor {<br><br> private MessageDao dao;<br><br> public void setDao(MessageDao dao) {<br>
this.dao = dao;<br> }<br> public MessageDao getDao() {<br> return dao;<br> }<br><br>public Object invoke(MethodInvocation invocation) throws Throwable {<br> $B!%!%!%(B<br><span></span><br>Message[] mes = dao.getAllMessage();<br>
<br> $B!%!%!%(B<br>}<br><br> app_aop.dicon$B$G@k8@$7$^$7$?!#(B<br><components namespace="app_aop"><br> <component name="loginAuthInterceptor"<br>class="com.teeda.interceptor.LoginAuthInterceptor" /><br>
</components><br> customizer.dicon$B$G@k8@$7$^$7$?!#(B<br> <component name="authAspectCustomizer"<br>class="org.seasar.framework.container.customizer.AspectCustomizer"><br> <initMethod name="addInterceptorName"><br>
<arg>"app_aop.loginAuthInterceptor"</arg><br> </initMethod><br> <property name="pointcut">"prerender"</property><br> </component><br>
//messageDao.java<br><br> package com.teeda.dao;<br><br> import com.teeda.entity.Message;<br><br> public interface MessageDao {<br><br> public static final Class BEAN = Message.class;<br><br> public static final String ARGS_findByMessageId = "id";<br>
<br> public Message[] findByMessageId(String id);<br> public Message[] getAllMessage();<br> }</div>
<div> env.txt$B$G(B</div>
<div>$B!!4D6-$r(Bit$B$K@_Dj$9$k!#(B</div>
<div><br> $B0J>e$N$h$&$JMxMQ$9$k>l9g!"(BLoginAuthInterceptor $B$N%W%m%Q%F%#(BDao$B<hF@$7$^$;$s$G$7$?!#(B<br>$B$@$+$i!"(BPageClass$B$K%W%m%Q%F%#(BDao$B$H(Bgetter/ setter $B%a%C%=!<%I$rMxMQ$7$F(B<br><br> Dao$B$r<hF@$G$-$k!#(B $B;d$O;HMQ$NJ}K!$O4V0c$$$,$"$k$G$9$,!#65$($F$/$@$5$$!#(B<br> $B0J>e(B $B$h$m$7$/$*4j$$$7$^$9!#(B<br> </div>