这是我的controller:
@RequestMapping("/editFabricSubmit")
public String editFabricSubmit(HttpServletRequest request,
Fabric fabric,
MultipartFile fabric_pic) throws Exception{
String originalFilename = fabric_pic.getOriginalFilename();
if(fabric_pic!=null && originalFilename!=null && originalFilename.length()>0){
String pic_path = "D:\\pic\\";
String newFileName = UUID.randomUUID() + originalFilename.substring(originalFilename.lastIndexOf("."));
File newFile = new File(pic_path+newFileName);
fabric_pic.transferTo(newFile);
fabric.setPic(newFileName);
}
fabricService.updateByPrimaryKeySelective(fabric);
return "success";
这是我的po:
private Integer id;
private String name;
private String compositions;
private Double baseprice;
private String yarncount;
private String density;
private String weight;
private String width;
private String pic;
private String supplierno;
private Double restmeter;
这是我的mapper.
<update id="updateByPrimaryKeySelective" parameterType="textile.ssm.po.Fabric" >
update fabric
set name = #{name,jdbcType=VARCHAR},
compositions = #{compositions,jdbcType=VARCHAR},
baseprice = #{baseprice,jdbcType=DOUBLE},
yarncount = #{yarncount,jdbcType=VARCHAR},
density = #{density,jdbcType=VARCHAR},
weight = #{weight,jdbcType=VARCHAR},
width = #{width,jdbcType=VARCHAR},
pic = #{pic,jdbcType=VARCHAR}
id = #{id,jdbcType=INTEGER},
restmeter = #{restmeter,jdbcType=DOUBLE},
where supplierno = #{supplierno,jdbcType=INTEGER}
为什么一直显示
there is no ** getter for property named 'technics' in 'class textile.ssm.po.Fabric'