java
mendel_liang
这个作者很懒,什么都没留下…
展开
-
camel Direct and import the routes from another XML file
接着前面前面的camel web 章程,本章程主要介绍 Direct,seda,和 routes的xml导入(import)。 建议在阅读该文时参阅笔者前两篇博客 apache camel jetty to http using Camel in a Web Application 先来简单的,direct (点击进入官网) 和 how do import r原创 2015-07-24 17:41:13 · 736 阅读 · 0 评论 -
linux 操作日记
使用 apt-get install 安装程序是有时候会出现 404 ,找不到。使用如下更新 ubuntu的源,在重新安装 sudo apt-get update && sudo apt-get upgrade 检测端口是否占用 netstat -ap |grep 8080 使用kill 进程id ,干掉占用进程转载 2015-11-11 16:49:18 · 249 阅读 · 0 评论 -
Java的日期格式化常用方法
Java的日期格式化常用方法 一般常用格式化类DateFormat和SimpleDateFormat的format(Date time)方法进行格式化日期. 1. 首先介绍java.text.SimpleDateFormat类. public class SimpleDateFormat extends DateFormat Simple转载 2016-01-26 17:29:12 · 557 阅读 · 0 评论 -
java & javascript 自定义加密数据传输
再实际开发中可以能遇到不希望明文传输,简单加密处理的数据。可利用 亦或,并,且,等进行简单加密。 示例代码中使用的 ^ 运算 key = 0x01,可自定义自己的规则。定义自己的运算,保证可逆数据不丢失即可。 key 也可定义,动态key。 java 代码 public static String myEncode(String str) throws Unsupported原创 2015-11-30 09:22:13 · 444 阅读 · 0 评论 -
json datatime convert
原文链接 1.JSON日期格式转换 默认JSON对DATE类型会转换成一个多属性对象, 而不是单独的一个字符串, 在某些应用处理上不是很方便, 可以利用JsonValueProcessor来实现日期的转换. 默认格式: "lastUpdate": { "date": 29, "day": 3转载 2015-11-19 18:14:04 · 470 阅读 · 0 评论 -
spring-data-jpa 问题汇总
时间类型和 数据库默认时间处理,entity 配置如下 import java.util.Date; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Column; @Temporal(TemporalType.TIMESTAMP) @Ba原创 2015-11-19 14:28:50 · 335 阅读 · 0 评论 -
spring log4j properties 配置
log4j.rootLogger=debug, stdout, R log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout # Pattern to output the caller's file name and li转载 2015-11-02 14:01:11 · 392 阅读 · 0 评论 -
apache camel jetty http
apache camel http 1,创建一个java控制台程序 建议maven,用pom.xml管理 org.apache.camel camel-core 2.15.2 org.apache.camel camel-jet原创 2015-07-23 17:46:27 · 3172 阅读 · 1 评论 -
using Camel in a Web Application
上篇,介绍了如何用控制台加载camel,route。 本章主要介绍如何在web application中使用 camel。 Setp1 : web.xml 主要添加 是添加 spring 的 contextLoaderListener,因为 camel的route通过spring - applicationContext来加载 。 注意,下面有注释掉 context-param原创 2015-07-24 15:13:14 · 471 阅读 · 0 评论 -
dbPool sybase connection pool
在java中实现 sybase connection pool 使用 dbpool,这里需要注意 ,dbpool 使用的日志库是 slf4j ,所以,在如果你项目使用的日志库不是 slf4j,那么就需要在你的项目中引入 slf4j-api-1.7.7.jar slf4j-log4j12-1.7.7.jar log4j-1.2.17.jar 这3个 jar包。原创 2015-07-14 17:09:57 · 1090 阅读 · 0 评论 -
apache camle template , Adding Routes dynamically
1在代码中如何获取 camleContext 原文链接 CamelContextAware If you want to be injected with the CamelContext in your POJO just implement the CamelContextAware interface; then when Spring creates your POJO the转载 2015-09-21 17:08:56 · 913 阅读 · 0 评论