摘要: # 问题 Invalid bound statement (not found) # 解决 <mappers> 标签的包括的是 SQL 语句存在的地方,此外 <mapper> 的 namespace 属性一定要具体到类而不是包,比如是 per.piers.onlineJudge.mapper.Use 阅读全文
posted @ 2017-05-08 22:46 Piers 阅读(198) 评论(0) 推荐(0) 编辑
摘要: mybatis-config.xml: applications.properties: context.xml(JNDI配置数据源): UserMapper.xml: 阅读全文
posted @ 2017-05-08 22:37 Piers 阅读(1047) 评论(0) 推荐(0) 编辑
摘要: # 前言 内容基本拷贝,整理出来,方便以后回忆。 # What The Java Naming and Directory Interface™ (JNDI) is an application programming interface (API) that provides naming and 阅读全文
posted @ 2017-04-18 17:14 Piers 阅读(326) 评论(0) 推荐(0) 编辑
摘要: # 地址 https://github.com/mofadeyunduo/crawler # 前言 1、代码不断优化更新。 2、有建议请留言。 # 介绍 1、多线程,基于 ExcutorServcie。 2、使用 Socket 进行 HTTP 请求。 # 优化想法 1、线程复用,不为每一个网页单独创 阅读全文
posted @ 2017-04-16 00:22 Piers 阅读(1237) 评论(0) 推荐(0) 编辑
摘要: # 样例 输出: 22:52:14.093 [main] INFO HelloWorld - Admin actions are triggered # Reference http://self-learning-java-tutorial.blogspot.jp/2015/10/log4j2-m 阅读全文
posted @ 2017-04-14 23:02 Piers 阅读(581) 评论(0) 推荐(0) 编辑
摘要: # 模板 # Spring 集成 # 模板代码 # Reference https://my.oschina.net/xianggao/blog/523401 Log4j2配置文件详解 http://blog.csdn.net/lrenjun/article/details/8178875 Log4 阅读全文
posted @ 2017-04-14 22:30 Piers 阅读(213) 评论(0) 推荐(0) 编辑
摘要: # 问题 Spring 提供了CharcterEncodingFilter,专门解决字符串编码的问题。 诡异的是,在类 AbstractAnnotationConfigDispatcherServletInitializer 方法 getFilters 设置了 CharcterEncodingFil 阅读全文
posted @ 2017-04-12 18:17 Piers 阅读(2125) 评论(0) 推荐(0) 编辑
摘要: # 假设 class Food {} class Fruit extends Food {} class Apple extends Fruit {} class Orange extends Fruit{} # ? extends class extends 很直接明了,继承。这句话含义:某个类继 阅读全文
posted @ 2017-04-02 01:03 Piers 阅读(244) 评论(0) 推荐(0) 编辑
摘要: # 乱码 ## 描述 环境:Tomcat 8 + Spring 4 + Spring Security。 问题描述: 在类 AbstractAnnotationConfigDispatcherServletInitializer 方法 onStartup 开头设置了 CharcterEncoding 阅读全文
posted @ 2017-03-31 10:22 Piers 阅读(147) 评论(0) 推荐(1) 编辑
摘要: # 前言 简单了解 SecurityManager。具体查阅 API。 # What 它是 Java 沙盒模型控制安全的重要一个环节。它是 Java 的一个类。下面一段话源于SecurityManager API: The security manager is a class that allow 阅读全文
posted @ 2017-03-22 17:00 Piers 阅读(264) 评论(0) 推荐(0) 编辑