为什么#{params.property}无法在mybatis中获得价值?

时间:2018-09-07 16:32:32

标签: mybatis

我的daoService是

int insertSelective(@Param("series") Series series, @Param("table") Map<String, String> table);

我的mapper.xml是

<insert id="insertSelective" statementType="STATEMENT">
insert into ${table.seriesTable}
<trim prefix="(" suffix=")" suffixOverrides="," >
  <if test="series.seriesName != null" >
    series_name,
  </if>
<trim prefix="values (" suffix=")" suffixOverrides="," >
  <if test="series.seriesName != null" >
    '${series.seriesName}',
  </if>
</trim>

当我使用'$ {series.seriesName}'时,我可以获得值, 但是#{series.seriesName}不能。为什么?

0 个答案:

没有答案