- 博客(4)
- 收藏
- 关注
原创 SQL中exists函数用法,转为Hibernate的QBC查询
都知道这样的语句:GROP TABLE user IF EXISTS如果这个表存在,则删除一个表。但是在实际查询中,exists函数就用的少了。今天做一个关联多表的查询,需要过滤掉满足某一条件的这些数据,大概的需求:1、查询用户角色是学生(涉及到三个表:user、role、rel_user_role)的列表;2、一个学生只能加入某老师创建的一个分组,不能同时
2013-10-24 23:15:41 2009
原创 springMVC自定义json序列化格式,将Date格式化为字符串
public class CustomDateSerializer extends JsonSerializer { public void serialize(Date value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { SimpleDa
2013-10-23 16:19:39 2167
原创 看到一道有意思的题目——自增陷阱
public static void main(String[] args) { int count = 0; for (int i = 0; i < 10; i++) { count = count++; } System.out.println(count); // 0}求解count的值是多少? 答案是0. 必须明白:count = cou
2013-10-22 22:36:16 806
原创 springMVC对简单对象、Set、List、Map的数据绑定和常见问题.
1、相关的类:查看spring源码可以看出spring支持转换的数据类型:org.springframework.beans.PropertyEditorRegistrySupport: /** * Actually register the default editors for this registry instance. */ private void creat
2013-10-12 11:09:16 10200 3
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人