圣旭 2016-03-02 01:39 采纳率: 0%
浏览 1481

spring+ibatis的dao接口 能使用内部类吗?

spring+ibatis的dao接口 能使用内部类吗?
spring扫描xml加载的
要怎么配置?
现在加载不到namespace指定的内部类

public interface MissionTypeMatterMapper {

    int deleteByPrimaryKey(Integer mission_matter_id);

    void insert(MissionTypeMatter record);

    List<MissionType> selectByPrimaryKey(Integer mission_matter_id);

    List<MissionMatter> selectByMatterType(@Param("mission_matter_id") Integer mission_matter_id,
            @Param("matter_type_id") Integer matter_type_id);

    List<MissionMatter> missionMatterList(MatterSearchOption keyword);

    Integer countMissionMatter(MatterSearchOption keyword);

    public interface EquipmentTypeMatterMapper extends MissionTypeMatterMapper {
    }

    public interface SecurityTypeMatterMapper extends MissionTypeMatterMapper {
    }
}

接口 EquipmentTypeMatterMapper、SecurityTypeMatterMapper 有对应的xml文件,但无法实例化

  • 写回答

3条回答 默认 最新

  • 猿小鹏 2016-03-02 02:07
    关注

    你定义的内部类本来就不适合外部访问吧?这个和Spring没啥关系,是否可以换一个实现方式

    评论

报告相同问题?

悬赏问题

  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。