zno2

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 21 下一页

2018年12月13日 #

line number is important in Exceptions.

摘要: 行号作为debug信息 在出现异常时可以迅速定位 解读 异常信息出现在 "main" 线程 位置是 ztest.Test (类的全限定名 )的 main (方法)(Test.java 文件的第9行) 反编译后的class是: 这里的行号是指 java 源文件中的行号 Ctrl+L 可打开 增加/删除 阅读全文

posted @ 2018-12-13 19:58 zno2 阅读(127) 评论(0) 推荐(0) 编辑

2017年10月19日 #

dom4j 使用原生xpath 处理带命名空间的文档

摘要: 测试文件 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache. 阅读全文

posted @ 2017-10-19 10:12 zno2 阅读(293) 评论(0) 推荐(0) 编辑

dom4j 通过 org.dom4j.XPath 设置命名空间来支持 带namespace 的 xpath

摘要: 测试文件 test.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mave 阅读全文

posted @ 2017-10-19 10:10 zno2 阅读(954) 评论(0) 推荐(0) 编辑

dom4j 创建一个带命名空间的pom.xml 文件

摘要: http://xml.apache.org/xalan-j/index.html 需要的jar包 示例 运行结果 PS: 1) org.dom4j.DocumentFactory 新建 document , javax.xml.parsers.DocumentBuilderFactory 也是新建 阅读全文

posted @ 2017-10-19 10:09 zno2 阅读(2649) 评论(0) 推荐(0) 编辑

xml to xsd ; xsd to xml

摘要: xml to xsd 工具网站 https://www.freeformatter.com/xsd-generator.html http://xmlgrid.net/xml2xsd.html 示例xml 示例xsd结果 xsd to xml Spring Tool Suite 4 -> 右键 xs 阅读全文

posted @ 2017-10-19 10:08 zno2 阅读(397) 评论(0) 推荐(0) 编辑

sax 动态切换 抓取感兴趣的内容(把element当做documnet 处理)

摘要: 由switch 类触发事件 由api 触发事件 具体的实现 测试文件: 结果: 补充: 可通过构造函数传入感兴趣的字段,“a,b,c,d” 补充(如果控制顺序): 阅读全文

posted @ 2017-10-19 10:07 zno2 阅读(208) 评论(0) 推荐(0) 编辑

如何比较两个xml 的异同

摘要: http://www.xmlunit.org/ <root> <id>123</id> <name>liming</name> </root> <root> <id>1234</id> <name>liming</name> </root> 运行结果: 阅读全文

posted @ 2017-10-19 10:04 zno2 阅读(599) 评论(0) 推荐(0) 编辑

xslt 简单的语法

摘要: 1. 循环 2. 定义变量赋值使用 3. if判断 4. 为元素设置属性() 阅读全文

posted @ 2017-10-19 10:03 zno2 阅读(131) 评论(0) 推荐(0) 编辑

xslt 和一个demo

摘要: https://www.w3.org/1999/XSL/Transform Specifications The XSLT language has three versions which are distinguished by content of the version attribute: 阅读全文

posted @ 2017-10-19 10:02 zno2 阅读(179) 评论(0) 推荐(0) 编辑

event based xml parser (SAX) demo

摘要: 运行结果: 阅读全文

posted @ 2017-10-19 10:01 zno2 阅读(131) 评论(0) 推荐(0) 编辑

SAX vs. DOM (Event vs. Tree)

摘要: http://www.saxproject.org/event.html Events vs. Trees(大XML文档用SAX) There are two major types of XML (or SGML) APIs: Tree-based APIsThese map an XML doc 阅读全文

posted @ 2017-10-19 10:00 zno2 阅读(182) 评论(0) 推荐(0) 编辑

xmlns 实例分析

摘要: xmlns="http://www.springframework.org/schema/beans" 这个是默认的命名空间(就是没有前缀,这个文档中 <beans /> 和 <bean /> 标签都用这个命名空间) 在schemaLocatoin 中 ,格式都是固定的 k空格v回车 (k&nbsp 阅读全文

posted @ 2017-10-19 09:55 zno2 阅读(413) 评论(0) 推荐(0) 编辑

doc.getElementById(id); null

摘要: demo: 输出结果是:null 原因见红色字内容 如何解决: 为该文档声明DTD 其中有一种内部声明方法如下: 还有一种外部声明方法: 其中内部声明方法的解释是: https://www.w3schools.com/xml/xml_dtd_elements.asp 本例的解决方案: 语法: htt 阅读全文

posted @ 2017-10-19 09:53 zno2 阅读(521) 评论(0) 推荐(0) 编辑

2017年9月25日 #

Gitolite 权限控制

摘要: 官网 http://gitolite.com/gitolite/index.html 安装配置 http://gitolite.com/gitolite/install/ 傻瓜安装教程 http://gitolite.com/gitolite/fool_proof_setup/ 快速指南(中文)ht 阅读全文

posted @ 2017-09-25 18:40 zno2 阅读(1717) 评论(0) 推荐(0) 编辑

源项目 -> fork -> 本地 (如何把源项目的代码合并到本地然后推送给fork)

摘要: 第一步:命令行进入到本地.git 所在的目录,查看remote 信息 ,只有 fork 第二步:添加一个remote ,别名是 upstream ,地址是源项目地址 执行完毕之后 \.git\config 文件中增加了三行 第三步:查看remote 信息 ,有两个,一个是origin(本地项目从哪来 阅读全文

posted @ 2017-09-25 18:39 zno2 阅读(467) 评论(0) 推荐(0) 编辑

2017年9月15日 #

Spring AOP 原理

摘要: 静态代理 打印结果: JDK 动态代理(基于接口) 打印: CGLIB CGLIB (Byte Code Generation Library is high level API to generate and transform Java byte code. It is used by AOP, 阅读全文

posted @ 2017-09-15 09:24 zno2 阅读(186) 评论(0) 推荐(0) 编辑

2017年9月11日 #

java.util.HashMap

摘要: load factor 满载率 capacity 容量 threshold 临界值 控制treeify的临界值是8 ,当bin中链大于8时,则尝试treeify 1)如果此时表容量不足64,则会扩表。因此添加第9个元素时,由16->32 ,添加第10个元素时,由32->64 2)添加第11个元素时, 阅读全文

posted @ 2017-09-11 12:36 zno2 阅读(492) 评论(0) 推荐(0) 编辑

2017年9月3日 #

dom4j 通过 org.dom4j.DocumentFactory 设置命名空间来支持 带namespace 的 xpath

摘要: 测试文件 test.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mave 阅读全文

posted @ 2017-09-03 11:06 zno2 阅读(451) 评论(0) 推荐(0) 编辑

2016年10月17日 #

21)pom 中的缺省值(default properties)

摘要: 1 引言 项目中build 时用到了maven-jar-plugin ,其中有一个 ${project.build.directory} 正常理解是:在这个pom中或者父pom中通过 <properties> 定义这个属性 但是找了许久没有找到,通过查找各种资料才知道这是一个缺省值(dafault- 阅读全文

posted @ 2016-10-17 17:42 zno2 阅读(924) 评论(0) 推荐(0) 编辑

what is a ear

摘要: http://docs.oracle.com/javaee/6/tutorial/doc/bnaby.html An EAR file (see Figure 1-6) contains Java EE modules and, optionally, deployment descriptors. 阅读全文

posted @ 2016-10-17 17:17 zno2 阅读(254) 评论(0) 推荐(0) 编辑

lazy?

摘要: https://developer.jboss.org/wiki/LazyEJB31timerservicedeploymentstartingJBossAS600M5 2016-09-28 18:53:28,899 INFO [org.jboss.as] (Controller Boot Thre 阅读全文

posted @ 2016-10-17 17:17 zno2 阅读(148) 评论(0) 推荐(0) 编辑

jboss developers studio 快速创建 spring mvc 项目

摘要: 1. 2. 部署运行 还有一个 rest very good !! ps:其实就是 一个 jboss 的 spring mvc maven 原型 阅读全文

posted @ 2016-10-17 17:17 zno2 阅读(184) 评论(0) 推荐(0) 编辑

jboss hello world

摘要: http://developers.redhat.com/products/devstudio/get-started/ 1. 下载 Red Hat JBoss Developer studio 2. 安装 eclipse 3. 打开 eclipse 4. 配置maven 5. 下载 jboss h 阅读全文

posted @ 2016-10-17 17:17 zno2 阅读(1080) 评论(0) 推荐(0) 编辑

tomee 消息持久化

摘要: http://tomee.apache.org/jms-resources-and-mdb-container.html http://activemq.apache.org/xml-configuration.html http://activemq.apache.org/persistence. 阅读全文

posted @ 2016-10-17 17:16 zno2 阅读(269) 评论(0) 推荐(0) 编辑

jboss [how to access the admin console]

摘要: However you have not yet added any users to be able to access the admin console. 进入%EAP_HOME%/bin 执行add-user.bat 添加用户 F:\ee\jbossruntimes\jboss-eap-7. 阅读全文

posted @ 2016-10-17 17:16 zno2 阅读(788) 评论(0) 推荐(0) 编辑

jboss 7 启动问题

摘要: 19:30:50,176 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA19:30:50,458 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA19:30:50,520 INFO [org 阅读全文

posted @ 2016-10-17 17:16 zno2 阅读(132) 评论(0) 推荐(0) 编辑

catalina.properties

摘要: 追踪 startup.bat catalina.bat 源码 搜索 catalina.properties 出现在CatalinaProperties.java 中 读取指定名称【catalina.properties】文件流,生成 Properties 对象,设置到System 环境变量中 至此, 阅读全文

posted @ 2016-10-17 17:15 zno2 阅读(2120) 评论(0) 推荐(1) 编辑

setenv.bat

摘要: catalina.bat 的注释 里面明确说道:不要把变量设置到catalina.bat 脚本,如果有需要把变量设置到setenv.bat 保证个性化的变量与tomcat 自有变量分离 setenv.bat 是被执行 实际应用 setenv.bat 内容如下: linux shell script 阅读全文

posted @ 2016-10-17 17:15 zno2 阅读(1889) 评论(0) 推荐(0) 编辑

tomee.xml

摘要: 部署 containers (EJB) Session bean Message driven bean resources DataSource ActiveMQResourceAdapter javax.jms.ConnectionFactory javax.jms.Queue javax.jm 阅读全文

posted @ 2016-10-17 17:15 zno2 阅读(343) 评论(0) 推荐(0) 编辑

tomee 系列问题

摘要: 1. remote client 无法建立连接 修改system.properties 2. class not found 如下列表(添加到tomee lib): 3. JNDI lookup for a QueueConnectionFactory return null jndi.proper 阅读全文

posted @ 2016-10-17 17:14 zno2 阅读(757) 评论(0) 推荐(0) 编辑

tomee 第一个 远程调用 Session Bean

摘要: 参考文档 http://tomee.apache.org/ http://download.oracle.com/otndocs/jcp/ejb-3.1-pfd-oth-JSpec/ http://download.oracle.com/otndocs/jcp/7195-jms-1.1-fr-spe 阅读全文

posted @ 2016-10-17 17:13 zno2 阅读(906) 评论(0) 推荐(0) 编辑

tomee 第一个 远程调用 Message-driven bean(MDB)

摘要: MDB 整体结构 HelloMDB.java ejb-jar.xml pom.xml Client 整体结构 HelloMDBClient.java jndi.properties pom.xml 部署运行 运行客户端 阅读全文

posted @ 2016-10-17 17:13 zno2 阅读(493) 评论(0) 推荐(0) 编辑

Java EE 参考文档及sample

摘要: http://docs.oracle.com/javaee/6/tutorial/doc/ https://svn.java.net/svn/javaeetutorial~svn/ 检索: site:java.net simplemessage 阅读全文

posted @ 2016-10-17 17:12 zno2 阅读(123) 评论(0) 推荐(0) 编辑

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) 编辑

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 21 下一页

导航