问题描述
javaEE中泛型service层怎么注入多个dao求解,感激不尽
解决方案
解决方案二:
privateUserdaouserdao;privateEmpdaoempdao;@Resource(name="userdao")publicvoidsetService(Userdaouserdao){this.userdao=userdao;}@Resource(name="empdao")publicvoidsetService(Empdaoempdao){this.empdao=empdao;}
解决方案三:
泛型Service层?,BaseService才加泛型吧,又不在BaseService中注入
时间: 2024-10-26 22:01:55