断弯刀

导航

随笔分类 -  java

[mybatis]Example的用法
摘要:Example类是什么? Example类指定如何构建一个动态的where子句. 表中的每个non-BLOB列可以被包括在where子句中. 例子是展示此类用法的最好方式. Example类可以用来生成一个几乎无限的where子句. Example类包含一个内部静态类 Criteria 包含一个用 阅读全文

posted @ 2018-11-19 18:34 断弯刀 阅读(17917) 评论(0) 推荐(0)

Mybatis-PageHelper分页插件
摘要:PageHelper.startPage 静态方法调用 除了 PageHelper.startPage 方法外,还提供了类似用法的 PageHelper.offsetPage 方法。 在你需要进行分页的 MyBatis 查询方法前调用 PageHelper.startPage 静态方法即可,紧跟在这 阅读全文

posted @ 2018-11-18 16:14 断弯刀 阅读(686) 评论(0) 推荐(0)

分页总结
摘要:品优购中,前端接收数据:总记录数(数字值),需要的当前页的数据记录。 发送数据:当前页页码(就是要看的那一页的页码),每页的记录数量(要看的那一页的需要的数据条数)。 思考:前端需要总记录数量来分页,因为前端可以选择每页有几条记录数量,需要知道总记录数。 然后需要接收到要展示的那一页的数据。 发送给 阅读全文

posted @ 2018-11-18 10:07 断弯刀 阅读(237) 评论(0) 推荐(0)

MyBatis Generator
摘要:MyBatis Generator 官方文档 阅读全文

posted @ 2018-11-17 20:27 断弯刀 阅读(335) 评论(0) 推荐(0)

servlet路径获取
摘要:本文章主要讨论以下几种request获取路径的方法: 以一个简单的例子说明: web.xml配置(注意此处的url-pattern项) TestServlet.java文件: 此时请求http://localhost:8080/testweb (url-pattern=/*) 打印出来的值为: 请求 阅读全文

posted @ 2018-10-26 11:28 断弯刀 阅读(1489) 评论(0) 推荐(0)

servlet中请求转发(forword)与重定向(sendredirect)
摘要:请求转发和重定向 request.setAttribute("test","hello"); request.getRequestDispatcher("/test.jsp").forword(request,response); response.sendRedirect("test.jsp"); 阅读全文

posted @ 2018-10-26 11:12 断弯刀 阅读(41752) 评论(3) 推荐(9)

servlet编码问题
摘要:建议每个servlet都写上 request.setCharacterEncoding("UTF-8") 阅读全文

posted @ 2018-10-26 09:20 断弯刀 阅读(247) 评论(0) 推荐(0)

eclipse 自动生成json格式的toString()方法
摘要:文本代码 阅读全文

posted @ 2018-09-16 10:35 断弯刀 阅读(1724) 评论(0) 推荐(0)

lucene教程--全文检索技术
摘要:1 Lucene 示例代码 https://blog.csdn.net/qzqanzc/article/details/80916430 2 Lucene 实例教程(一)初识Lucene https://blog.csdn.net/chenghui0317/article/details/10052 阅读全文

posted @ 2018-09-11 19:49 断弯刀 阅读(315) 评论(0) 推荐(0)

Tomcat配置
摘要:1 路径写不写项目名问题 放在host标签里 server.xml配置 2 url路径包含中文 server.xml配置 阅读全文

posted @ 2018-09-01 19:58 断弯刀 阅读(158) 评论(0) 推荐(0)

InitComponent的使用
摘要:网页中的数据,有些是不在网页上改变的,像一些个人信息,比如:头像,当前用户名,友情链接等等,每次请求该页面都要重新加载,这样很消耗服务器资源,会降低服务器的性能,这个时候我们可以把这些不变的信息,统一放到application中,当用户登录时候,就加载到application中,当重新加载使用该信息 阅读全文

posted @ 2018-08-25 11:05 断弯刀 阅读(290) 评论(0) 推荐(0)

Shiro权限总结
摘要:参考学习地址 shiro 瞅完就会用(ssm+shiro) Spring Shiro配置实现用户认证和授权 anon:它对应的过滤器里面是空的,什么都没做,另外.do和.jsp后面的*表示参数,比方说[login.jsp?main]这种 authc:该过滤器下的页面必须验证后才能访问,它是内置的or 阅读全文

posted @ 2018-08-24 22:03 断弯刀 阅读(512) 评论(0) 推荐(0)

Java操作Excel之Poi
摘要:POI中文API文档 http://www.cnblogs.com/fqfanqi/p/6172223.html jar包下载 https://download.csdn.net/download/qq_38327551/10558375 阅读全文

posted @ 2018-07-23 20:18 断弯刀 阅读(266) 评论(0) 推荐(0)

SSM总结
摘要:1 报错: cvc-complex-type.2.4.a: Invalid content was found starting with element 'async-supported'. One of '{"http://java.sun.com/xml/ns/javaee":init-par 阅读全文

posted @ 2018-06-16 14:29 断弯刀 阅读(160) 评论(0) 推荐(0)

servlet
摘要:1 Tomcat 设置URI默认字符集为UTF-8 https://blog.csdn.net/loveaborn/article/details/44450873 2 request和response的中文乱码问题 https://www.cnblogs.com/caowei/p/2013-12- 阅读全文

posted @ 2018-05-30 10:16 断弯刀 阅读(128) 评论(0) 推荐(0)

Struts和Hibernate使用总结
摘要:1 struts.xml重定向时报错 action cannot be found in the namespace/ http://blog.csdn.net/greetturing/article/details/65629823 2 struts2文件上传 https://www.cnblog 阅读全文

posted @ 2018-05-30 10:05 断弯刀 阅读(135) 评论(0) 推荐(0)

工具类
摘要:1 MD5加密http://zoroeye.iteye.com/blog/2026984?utm_source=tuicool&utm_medium=referral 注意其中导入 sun.misc.BASE64Encoder; 2 JDOM入门实例:读取与创建xml文档 https://www.c 阅读全文

posted @ 2018-05-30 09:53 断弯刀 阅读(145) 评论(0) 推荐(0)

快捷键
摘要:单词 Pagation 分页 java基础部分,javaweb基本开发(jsp/servlet/tomcat)、javascript、jquery、jqueryUI、mysql、jdbc、分层思想、设计模式、springIOC、springAOP、spring MVC表现层、hibernate-va 阅读全文

posted @ 2018-02-03 23:03 断弯刀 阅读(241) 评论(0) 推荐(0)