例如:接口 Iuser 需要返回list<uer>,在定义接口的包内新建一个XML文件(请注意,此文件一定要放到与接口相同的目录下面,否则会出错),用来解释该list中存放对象的类型,

XML使用以下命名规范:需要解释的接口名.aegis.xml        如本例: Iuser.aegis.xml

添加代码如下:

<?xml version="1.0" encoding="UTF-8"?>  
<mappings>  
   <mapping>  
     <method name="接口中方法名">  
           <return-type componentType="List内对象的完整类名" />  
     </method>  
   </mapping>  
</mappings>  

 

完整的类名 = 包名.类名          如: com.server.model.User

相关文章:

  • 2022-12-23
  • 2021-07-17
  • 2021-11-14
  • 2021-11-08
  • 2022-02-09
  • 2021-05-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2022-03-07
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案