标签:param return pos 两种 hash put key except select
后端get请求
public ResponseEntity<CommodityRespM02> commoditySelectMap(@RequestParam Commodity commodity) throws Exception {
...........................
}
后端post请求
public ResponseEntity<CommodityRespM02> commoditySelectMap(@RequestBody Commodity commodity) throws Exception {
...........................
}
/**
* 对象转map
* @param bean
* @return
*/
public static <T> Map<String, Object> beanToMap(T bean) {
Map<String, Object> map = Maps.newHashMap();
if (bean != null) {
BeanMap beanMap = BeanMap.create(bean);
for (Object key : beanMap.keySet()) {
map.put(key + "", beanMap.get(key));
}
}
return map;
}
标签:param return pos 两种 hash put key except select
原文地址:https://www.cnblogs.com/jassy/p/12065836.html