###前提・実現したいこと
現在springとmybatisを使ってinsert処理の開発をしており、DBにinsert処理はできましたが
resultする際にエラーが起きて困っております。
###発生している問題・エラーメッセージ
HTTPステータス 500 - Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Mapper method 'jp.co.kenshu.mapper.InsertMapper.insertTest' has an unsupported return type
###該当のソースコード
Controller
Map map = new HashMap();
map.put("id",form1.getId()); map.put("name",form1.getName()); map.put("pass",form1.getPass()); map.put("work",form1.getWork()); map.put("old",form1.getOld()); InsertDto insert = insertService.insertTest(map);
Service
public InsertDto insertTest(Map map) {
InsertDto dto = new InsertDto();
Insert entity = insertMapper.insertTest(map);
BeanUtils.copyProperties(entity, dto);
return dto;
}
Mapper
public interface InsertMapper {
Insert insertTest(Map map);
}
Mapper.xml
<mapper namespace="jp.co.kenshu.mapper.InsertMapper">
<insert id="insertTest" parameterType="java.util.Map" >
insert into test2 (id,name,pass,work,old) values (#{id},#{name},#{pass},#{work},#{old})
</insert>
</mapper>
###試したこと
8時間ほど悩んでおりますが、解決できておりません。springの本を読んだりネットで情報を探していますが、中々解決につながりません。ご回答ぜひお願い致します。
###補足情報(言語/FW/ツール等のバージョンなど)
java
eclipse4.5,
springは3.7.3を使用しています。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/05/24 23:30