a) table表格中,遍历出的数据除了第一行外别的行对于事件都不响应?
在获取元素的时候采用了id选择器,由于id唯一,所以在获取的时候只会获取第一行,这个时候应该采取class选择器是正确的做法。
b) 在后台采用ssm框架报这样的一个错误Error creating bean with name 'weeklyDiaryController': Unsatisfied dependency expressed through field 'weeklyDiaryService'; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'com.git.weekly.service.IWeeklyDiaryService' available: expected single matching bean but found 2: weeklyDairyService,IWeeklyDiaryService;
这里的controller里面的aotowired标签 中使用的是IWeeklyDiaryService weeklyDiaryService 在Service层中使用的是WeeklyDairyService ,这里的diary拼错了,他在controller层通过autowired标签给接口赋值时,找到了@service标签的实现层,中此时的Service层类名拼写错误,错误的找到了两个bean.这个错误找了很长时间。
本文探讨了前端开发中table表格事件响应问题及解决方案,同时解析了后端SSM框架下因bean定义不唯一导致的错误,并给出了正确做法。
1358

被折叠的 条评论
为什么被折叠?



