<div>$B2r$G$9(B<br>&nbsp;$B$$$D$b$*@$OC$K$J$F$*$j$^$9!#(B<br>&nbsp;public class LoginAuthInterceptor extends AbstractInterceptor {<br><br>&nbsp; &nbsp;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>&nbsp;$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>&nbsp; &nbsp;private MessageDao dao;<br><br>&nbsp; &nbsp;public void setDao(MessageDao dao) {<br>
&nbsp; this.dao = dao;<br>&nbsp;}<br>&nbsp;public MessageDao getDao() {<br>&nbsp; return dao;<br>&nbsp;}<br><br>public Object invoke(MethodInvocation invocation) throws Throwable {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$B!%!%!%(B<br><span></span><br>Message[] &nbsp; mes = dao.getAllMessage();<br>
<br>&nbsp;$B!%!%!%(B<br>}<br><br>&nbsp;app_aop.dicon$B$G@k8@$7$^$7$?!#(B<br>&lt;components namespace=&quot;app_aop&quot;&gt;<br>&nbsp;&lt;component name=&quot;loginAuthInterceptor&quot;<br>class=&quot;com.teeda.interceptor.LoginAuthInterceptor&quot; /&gt;<br>
&nbsp;&lt;/components&gt;<br>&nbsp;customizer.dicon$B$G@k8@$7$^$7$?!#(B<br>&nbsp; &lt;component name=&quot;authAspectCustomizer&quot;<br>class=&quot;org.seasar.framework.container.customizer.AspectCustomizer&quot;&gt;<br>&nbsp; &nbsp;&lt;initMethod name=&quot;addInterceptorName&quot;&gt;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;arg&gt;&quot;app_aop.loginAuthInterceptor&quot;&lt;/arg&gt;<br>&nbsp; &nbsp;&lt;/initMethod&gt;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;property name=&quot;pointcut&quot;&gt;&quot;prerender&quot;&lt;/property&gt;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/component&gt;<br>
&nbsp;//messageDao.java<br><br>&nbsp;package com.teeda.dao;<br><br>&nbsp;import com.teeda.entity.Message;<br><br>&nbsp;public interface MessageDao {<br><br>&nbsp; &nbsp; &nbsp; &nbsp;public static final Class BEAN = Message.class;<br><br>&nbsp; &nbsp; &nbsp; public static final String ARGS_findByMessageId = &quot;id&quot;;<br>
<br>&nbsp; &nbsp; &nbsp; &nbsp;public Message[] findByMessageId(String id);<br>&nbsp; &nbsp; &nbsp; &nbsp;public Message[] getAllMessage();<br>&nbsp; }</div>
<div>&nbsp; env.txt$B$G(B</div>
<div>$B!!4D6-$r(Bit$B$K@_Dj$9$k!#(B</div>
<div><br>&nbsp;$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>&nbsp;Dao$B$r<hF@$G$-$k!#(B $B;d$O;HMQ$NJ}K!$O4V0c$$$,$"$k$G$9$,!#65$($F$/$@$5$$!#(B<br>&nbsp;$B0J>e(B $B$h$m$7$/$*4j$$$7$^$9!#(B<br>&nbsp;</div>