为什么我在配置spring的<bean>的<property>标签时,提示未定义类 把setter方法删了 重新加下看看 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 路过看看UserMgr类 public class UserMgr { private User user; public UserMgr(User user) { this.user = user; } public void setUser(User user) { this.user = user; } public void userLogin(String userName, String password) { this.user.userLogin(userName, password); } } 在A类中调用Binterface接口的实现类Bimp;xxxapplicationContext.xml:<bean id="A" class="xxx.xxx.A"> <property name="b"> <ref local="Bimp" /> </property></bean><bean id="Bimp" class="xxx.xxx.Bimp"></bean>A类中:private Binterface b;加上setter方法; <bean id="userOracle" class="com.song.spring.dao.UserOracle" /> <bean id="userLogin" class="com.song.spring.userManager.UserMgr"> <!-- 使用构造函数对UserMgr初始化 --> <!-- <constructor-arg ref="userSql" /> --> <!-- 使用setter方法对UserMgr初始化 --> <property name="user"> <ref local="userSql"/></property></bean> MyEclipse Debug运行不了 JSP中 请问如何获取表单中的action参数 struts2 在页面过滤集合 并取出他的大小 为什么eWebEditor不能手动换行?? 文件类型如何被系统识别 高分请教一个spring事务问题 连接sql2000的问题. 新手请教:用户注册时如何使用token保存和删除username j2ee中的jdbc sql查询结果集,出现hashCode()地址相同 请问如何把ejb项目打包成.jar文件 读txt文件转码问题
UserMgr类
public class UserMgr {
private User user;
public UserMgr(User user) {
this.user = user;
}
public void setUser(User user) {
this.user = user;
}
public void userLogin(String userName, String password) {
this.user.userLogin(userName, password);
}
}
xxxapplicationContext.xml:<bean id="A"
class="xxx.xxx.A">
<property name="b">
<ref local="Bimp" />
</property>
</bean>
<bean id="Bimp" class="xxx.xxx.Bimp">
</bean>A类中:private Binterface b;加上setter方法;
<!-- 使用构造函数对UserMgr初始化 -->
<!-- <constructor-arg ref="userSql" /> --> <!-- 使用setter方法对UserMgr初始化 -->
<property name="user">
<ref local="userSql"/>
</property>
</bean>