zno2

2016年10月9日 #

"2016-10-06T12:09:18.303+0800"

摘要: Java 输出结果: JavaScript 输出结果: T 是什么 http://www.w3schools.com/js/js_date_formats.asp The T in the date string, between the date and time, indicates UTC t 阅读全文

posted @ 2016-10-09 16:23 zno2 阅读(242) 评论(0) 推荐(0) 编辑

json jackson

摘要: 1.引入依赖 2.添加 conventer indentOutput 缩进打印,false 无缩进 ,true 有缩进(格式化) simpleDateFormat 可以将日期类型自动转为指定格式字符串 具体用法可以查看该类 MappingJackson2HttpMessageConverter By 阅读全文

posted @ 2016-10-09 16:23 zno2 阅读(262) 评论(0) 推荐(0) 编辑

Spring MVC 指导文档解读(一)

摘要: 22.1 指导文档章节 In the Web MVC framework, each DispatcherServlet has its own WebApplicationContext, which inherits all the beans already defined in the ro 阅读全文

posted @ 2016-10-09 16:22 zno2 阅读(328) 评论(0) 推荐(0) 编辑

log4j.properties example

摘要: google search log4j.properties example Output to Console Output to File Output to Console and File 阅读全文

posted @ 2016-10-09 16:22 zno2 阅读(154) 评论(0) 推荐(0) 编辑

怎么定义 logger

摘要: 随便打开一个 spring 的 源文件,比如 PathMatchingResourcePatternResolver.class 里面是这样定义logger 的 这样的好处是: 一个这个类只有一个logger,所有这个类的实例均使用这个logger ,这个logger不会产生被二次赋值之类的低效操作 阅读全文

posted @ 2016-10-09 16:22 zno2 阅读(171) 评论(0) 推荐(0) 编辑

Spring MVC 指导文档解读(二)

摘要: Special Bean Types In the WebApplicationContext 解读 1.WebApplicationContext 特有的几种 Bean Types 2. 也表明 与之相对的 还有 ApplicationContext 下面这几种特有的 web bean types 阅读全文

posted @ 2016-10-09 16:22 zno2 阅读(522) 评论(0) 推荐(0) 编辑

what is a resolver

摘要: resolver [rɪ'zɒlvə] 解析器 ViewResolver The ViewResolver provides a mapping between view names and actual views. {view names : actual views} 举例1: 在 Contr 阅读全文

posted @ 2016-10-09 16:22 zno2 阅读(206) 评论(0) 推荐(0) 编辑

快速创建一个 Servlet 项目(1)

摘要: 1. 新建一个 maven project (web app) 得到如下项目 2. 添加 servlet 和 jsp 依赖 通常 servlet 和 jsp 依赖由web容器提供,这个编译错误并不会影响运行,但是为了开发方便,可以提供(provided)依赖 3. 创建servlet 右键项目 - 阅读全文

posted @ 2016-10-09 16:21 zno2 阅读(704) 评论(0) 推荐(0) 编辑

快速创建一个 Servlet 项目(2)

摘要: 1. 新建一个 webapp 参考 http://www.cnblogs.com/zno2/p/5909019.html 2.调整jdk版本 修改 pom.xml 文件,将jdk 调整为适当的版本,比如 1.7 上面这个错误需要执行一下 maven - update project 3. 升级web 阅读全文

posted @ 2016-10-09 16:21 zno2 阅读(413) 评论(0) 推荐(0) 编辑

java.util.zip.ZipException: invalid LOC header (bad signature)

摘要: 解释 这个错误是 jar包 的签名错误 解决办法 删除旧jar包,重新下载 阅读全文

posted @ 2016-10-09 16:21 zno2 阅读(326) 评论(0) 推荐(0) 编辑

url pattern

摘要: JSR340 在Servlet规范中,关于 web.xml 的 url-pattern 两种格式: 例如:/* 例如:*.do 规范中不存在 /** 上面的日志信息中指出 这是可疑的 ,请参考 Servlet 参考文档的 12.1 和 12.2 章节 spring mvc 中dispatcher 的 阅读全文

posted @ 2016-10-09 16:21 zno2 阅读(963) 评论(0) 推荐(0) 编辑

快速创建一个 spring mvc 示例

摘要: 1. 创建一个 servlet 项目 参考 http://www.cnblogs.com/zno2/p/5908589.html 2. 引入 spring mvc 依赖 注:在sts中创建spring bean configuration file 时就可以载入Namespaces (视情况需 up 阅读全文

posted @ 2016-10-09 16:21 zno2 阅读(220) 评论(0) 推荐(0) 编辑

Servlet Life Cycle

摘要: Servlet Life Cycle http://docs.oracle.com/javaee/5/tutorial/doc/bnafi.html Servlet Filters and Event Listeners http://docs.oracle.com/cd/B14099_19/web 阅读全文

posted @ 2016-10-09 16:21 zno2 阅读(465) 评论(0) 推荐(0) 编辑

webAppRootKey

摘要: Spring MVC 中的web.xml 中这个配置是什么意思呢? 查找资料后这个是由Spring 定义的一个值 具体作用在源码中: 它的作用就是 System.setProperty(key,root); key 的默认值 "webapp.root" 给这个key 换一个名字 root 是 ser 阅读全文

posted @ 2016-10-09 16:20 zno2 阅读(1373) 评论(0) 推荐(0) 编辑

Java EE Servlet 几个path

摘要: ContextPath Context ['kɒntekst] 不识庐山真面目,只缘身在此山中。 相对路径 RealPath 绝对路径 ServletPath 就是servlet-mapping 中 的 url-pattern 阅读全文

posted @ 2016-10-09 16:20 zno2 阅读(374) 评论(0) 推荐(0) 编辑

导航