在业务层取数据

这样取数据可通过两个途径完成.一个是通过action传递进来,一个通过spring的配置文件完成功之路
可以在配置文件里面写,相应的值
<bean id="loginServie" class="related class">
<property name="url" value="http://blog.csdn.net/hero272285642">
</bean>

loginservice里面这样写.

private String url;
get method
set method
通过以后两个get/set方法就可以取到url的值为http://blog.csdn.net/hero272285642,如果页面大量用到URL的值,且需要修改时
直接在配置文件里面修改就可以了

posted @ 2008-05-30 10:57  maventalker  阅读(101)  评论(0编辑  收藏  举报