2015 年文章归档
共 200 篇文章
test测试题
测试题 测试题 $.ajax({ type : "post", async:false, url : "http://localhost:8080/getArticle.do", data:{}, dataType : "jsonp", jsonp: "callback", success : function(data){ var panelStart = "<div class=\"panel panel-default\">"; var headStart = "<div class=\"panel-heading\">"; var bodyStart = "<div class=\"…
2015-12-27 22:06 · RABBIT
XSD (xml Schema Definition)
XSD (xml Schema Definition) Xml Schema的用途 1. 定义一个Xml文档中都有什么元素 2. 定义一个Xml文档中都会有什么属性 3. 定义某个节点的都有什么样的子节点,可以有多少个子节点,子节点出现的顺序 4. 定义元素或者属性的数据类型 5. 定义元素或者属性的默认值或者固定值 Xml Schema的根元素: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 表示数据类型等定义来自w3 targetNamespace="http://www.w3sc…
2015-11-21 08:02 · XSD
SELECT FOR UPDATE SKIP LOCKED --- 一个未公开但十分有用的特性
SELECT FOR UPDATE SKIP LOCKED 选项是ORACLE的一个未公开的特性,它的含义是SELECT时跳过被锁的记录。 考虑下面的例子: 会话1: SQL> select * from sex_dict ; SERIAL_NO S SEX_ INPUT_CO ---------- - ---- -------- 1 1 男 N 9 0 未知 WZ 2 2 女 N 4 9 未定 WD SQL> select * from sex_dict where serial_no = 1 for update ; SERIAL_NO S SEX_ INPUT_CO ---------…
2015-11-19 00:47 · Oracle11g
随笔记录
数据表设计: create table t_article ( article_id integer, article_title varchar2(200), article_content varchar2(2000), createdate date, updatedate date ) create table t_article_index( article_id integer, index_updatedate date ) insert into t_article values (1,'title1','content1',sysdate,sysdate); insert …
2015-11-17 22:27 · RABBIT
solr <defaultSearchField>
solr <defaultSearchField> 在schema.xml中。 <defaultSearchField>text</defaultSearchField> 如果在localhost/solr/admin中直接搜索文字, 而不是title:xx, 就会搜索这个text域的索引内容。 所以如果我们想直接搜索某个域的索引, 只要修改这里就行了。 ================ 可以设置多个 比如 <defaultSearchField>msg_title</defaultSearchField> <defaultSearchField>msg_content</defaultSe…
2015-11-15 17:18 · Solr
Spring4MVC之注解详解[持续更新]
spring mvc常用的注解: 个介绍。 @Controller @Controller 负责注册一个bean 到spring 上下文中,bean 的ID 默认为 类名称开头字母小写,你也可以自己指定,如下 方法一: @Controller public class TestController {} 方法二: @Controller("tmpController") public class TestController {} @RequestMapping 1.@RequestMapping用来定义访问的URL,你可以为整个类定义一个 @RequestMapping,或者为每个方法指定…
2015-10-10 21:38 · Spring4MVC
PostgreSQL资料记录
地址:http://francs3.blog.163.com/ 历时两年, 终于和黄坚 (网名:洞庭湖的泥鳅) 将 PostgreSQL 9 Admin Cookbook 翻译完成, 2ndquadrant 购买地址: http://www.2ndquadrant.com/en/books/postgresql-9-cookbook-chinese-edition/ 作者 :Simon.Riggs Hannu Krosing 译者 :黄坚(网名:洞庭湖的泥鳅) 谭峰(网名: francs) 翻译很花时间,占用了大量的业余时间,在这里首先得感谢家人的支持,再次得感谢泥鳅,在翻译过程中,他给予了…
2015-09-29 21:29 · RABBIT
PostgreSQL问题
对PostgreSQL数据库有一定了解, 或者尝到甜头的朋友大多都会有这样的疑问, 为什么PostgreSQL好用却没有MySQL流行呢? 1 PG没MySQL流行的原因 因为没有使用过MySQL,所以不太好回答. 2 PG的优势有哪些?(请例举您认为的最优优势的5条,降序排列) 1.社区活跃(每天都有commit,每年全球大会,每年全球地方性会议等),运作稳定(主要贡献者来自全球的诸多行业的诸多企业,不会出现一家独控的局面), git版本管理, wiki知识库管理, BSD许可. 2.血统纯正,以及丰富的第三方插件.PostgreSQL的分支只有1个,不会出现分支众多,版本不统一的情况.第…
2015-09-29 21:20 · RABBIT
PostgreSQL资料
推荐书籍: 概念书籍: 《PostgreSQL Introduction and Concepts》 开发书籍: 《PostgreSQL开发必备参考手册》 管理类书籍: 《PostgreSQL 9 Administration Cookbook》 《PostgreSQL 9.0 High Performance》 《PostgreSQL Server Programming》 《How PostgreSQL Processes a Query》 了解内核 : http://www.postgresql.org/developer/backend/ http://wiki.postgresql…
2015-09-29 21:18
SpringMVC之Excel视图
Excel视图 若希望使用Excel 展示数据列表,仅需要扩展SpringMVC 提供的 AbstractExcelView 或AbstractJExcel View 即可。 实现 buildExcelDocument() 方法,在方法中使用模型数据对象构建 Excel 文档就可以了。 AbstractExcelView 基于 POI API,而AbstractJExcelView 是基于 JExcelAPI 的。 视图对象需要配置 IOC 容器中的一个 Bean,使用BeanNameViewResolver 作为视图解析器即可 若希望直接在浏览器中直接下载 Excel 文档,则可以设置响应…
2015-09-21 23:02 · Spring4MVC
Spring4MVC之请求转发和重定向
关于重定向 一般情况下,控制器方法返回字符串类型的值会被当成逻辑视图名处理 如果返回的字符串中带 forward: 或 redirect: 前缀时,SpringMVC 会对他们进行特殊处理: 将 forward: 和redirect: 当成指示符,其后的字符串作为 URL 来处理 redirect:success.jsp:会完成一个到 success.jsp 的重定向的操作 forward:success.jsp: 会完成一个到 success.jsp 的转发操作 示例 1. 添加请求handler /** * 类定义处标记的@RequestMapping 限定了处理器类可以处理所有 URI…
2015-09-21 21:56 · Spring4MVC
Spring4MVC之自定义视图
自定义视图 写数据到JFreeChart,excel等功能是通过此特性完成的 开发步骤 1. 添加自定义视图 package org.rabbitx.web.spring4mvc.customview; import java.util.Date; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Component; import org…
2015-09-21 21:35 · Spring4MVC
Spring4之Spring4
在基于主机方式配置Spring的配置文件中,你可能会见到<context:annotation-config/>这3样一条配置,他的作用是式地向 Spring 容器注册 AutowiredAnnotationBeanPostProcessor、CommonAnnotationBeanPostProcessor、 PersistenceAnnotationBeanPostProcessor 以及 RequiredAnnotationBeanPostProcessor 这 4 个BeanPostProcessor。 注册这4个 BeanPostProcessor的作用,就是为了你的系统能够识别相…
2015-09-16 12:30 · Spring4
Spring4MVC之国际化
Spring4MVC之国际化 1. 添加jstljar包:standard.jar,jstl.jar 2. 编写国际化资源文件:i18n.properties i18n.username=USERNAME: i18n.password=PASSWORD: i18n.submit=SUMBIT i18n.username=\u7528\u6237\u540D\uFF1A i18n.password=\u5BC6\u7801\uFF1A i18n.submit=\u767B\u5F55 3. 在springmvc.xml文件中配置国际化资源文件 <!--配置国际化资源文件--> <bean id…
2015-09-15 21:18 · Spring4MVC
Spring4MVC之@JstlView
JstlView 若项目中使用了 JSTL,则 SpringMVC 会自动把视图由InternalResourceView 转为 JstlView 若使用 JSTL 的 fmt 标签则需要在 SpringMVC 的配置文件中配置国际化资源文件 若希望直接响应通过 SpringMVC 渲染的页面,可以使用 mvc:view-controller 标签实现 1. 配置mvc:view-controller <!--配置直接转发页面--> <!--可以直接跳转至相应的页面,无需经过Handler的方法--> <!-- 测试地址: http://localhost:8080/org.rabbitx.…
2015-09-15 21:12 · Spring4MVC
Spring4MVC之视图解析流程
流程查看方法 1. 在任一handle方法中打断点调试,如在HelloworldController的sayHello方法中打断点; 2. 启动调试; 大致流程 1. DispatcherServlet.doDispatch(HttpServletRequest, HttpServletResponse) 2. AnnotationMethodHandlerAdapter.handle(HttpServletRequest, HttpServletResponse, Object) 3. AnnotationMethodHandlerAdapter.invokeHandlerMethod(H…
2015-09-15 20:27 · Spring4MVC