动态sql,整个查询语句都是动态的 mapper.xml: <select id="selectSql" resultType="java.lang.String"> ${sql} </select> mapper: String selectSql(@Param("sql") String sql); impl: //查询出的结果 String content = testMapper.selectSql(contentSql);