06 2019 档案

摘要:package cn.itcast.a_hql; import java.util.Arrays; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; import org.junit.Test; import c... 阅读全文
posted @ 2019-06-10 21:22 愚蠢的程序员 阅读(267) 评论(0) 推荐(0)
摘要:package cn.itcast.crm.util; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; /** * * * Title:... 阅读全文
posted @ 2019-06-10 21:12 愚蠢的程序员 阅读(292) 评论(0) 推荐(0)
摘要:package cn.itcast.crm.web.filter; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.Map; import javax.servlet.Filter; import javax.servlet.FilterChain; impor... 阅读全文
posted @ 2019-06-10 21:10 愚蠢的程序员 阅读(213) 评论(0) 推荐(0)
摘要:比如一张表: artile (id,type,content); type:1表示文艺类,2表示小说类,3表示传记,4表示传说,等等5,6,7,8 表数据: id type content 1 3,1 dfasdfasdf 2 1,3,6,8 dfasdf 3 6,8,9 add 现在要找出3传记类 阅读全文
posted @ 2019-06-10 17:53 愚蠢的程序员 阅读(1372) 评论(0) 推荐(0)
摘要:获取表单数据的时候,有这句代码request.setCharacterEncoding("UTF-8");,如果没有这句代码,会发生什么事呢? 填写数据 在服务器查看提交过来的数据,所有的中文数据都乱码了 来这里我们来分析一下乱码的原因,Tomcat服务器默认编码是ISO 8859-1,而浏览器使用 阅读全文
posted @ 2019-06-06 11:08 愚蠢的程序员 阅读(944) 评论(0) 推荐(0)
摘要:第一种: 第二种: 阅读全文
posted @ 2019-06-04 10:15 愚蠢的程序员 阅读(9250) 评论(0) 推荐(0)