随笔分类 -  经验总结

摘要:1. 这条语句主要是用来修复一个表中的数据 , 在另一个统计表中没有统计时,进行修改统计表的操作 update expert_count ec inner join ( select sum(e.EFFECT_SCORE) es_count, sum(e.ATTITUDE_SCORE) as_count, sum(e.PROMOTE_REASONABLE_SCORE) pro_count, sum(e.PRICE_REASONABLE_SCORE) pri_count, sum(e.ENVIRONMENT_... 阅读全文
posted @ 2014-01-25 10:39 coreWars 阅读(331) 评论(0) 推荐(0)
摘要:在jetty中是支持put方式操作的,在tomcat中默认是不支持的,解决方式很简单,在web.xml中添加一个过滤器即可。 httpPutFormContentFilter org.springframework.web.filter.HttpPutFormContentFilter httpPutFormContentFilter /* 阅读全文
posted @ 2014-01-04 22:49 coreWars 阅读(1500) 评论(0) 推荐(0)
摘要:客户端: 因为put只支持单一类型的资源进行传输,所以不能使用像 Multipart/form-data这样的content-type进行描述,而只能使用像image/jpeg 、image/png的形 式进行图片的传输。 代码: RestTemplate restTemplate = super.buildRestTemplate(); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.IMAGE_PNG); ... 阅读全文
posted @ 2014-01-04 22:47 coreWars 阅读(1624) 评论(0) 推荐(0)
摘要:在实体对象上添加@JsonAutoDetect , 表明对该实体对象序列化成json串。@JsonAutoDetect public class User{ private int id; private String name; // 省略getter 和 setter }如果不想序列化某个属性,可以使用@JsonIgnoreProperties 进行标记@JsonAutoDetect @JsonIgnoreProperties (value = { "id" , "age" }) public class User{ private int id; 阅读全文
posted @ 2013-12-16 13:47 coreWars 阅读(873) 评论(0) 推荐(0)