想要在select语句中完成Spring配置值与查询的结果进行拼接。
1 2 3 4 5 6 |
download: prefix: http://xxxx/get/ mybatis: mapper-locations: classpath:/mapper/*.xml configuration-properties: dowPush: ${download.prefix} |
1 2 3 |
<select> select CONCAT('${dowPush}', picture_url) as url from t_xxx where id = #{id} </select> |
这样就能够在MyBatis的xml映射文件中,读取到Spring的配置了。
from:https://blog.csdn.net/fxtxz2/article/details/129319872