ITeye博客

蓝色天空

blueram · 共 147 篇文章

enum使用一例

/** * User: renjunjie * Date: 13-6-25 下午4:43 * Function: */ public class AppContants { //政府机构 //public static final Integer ORG_GOVERN = 1; //节能公司 //public static final Integer ORG_ENERGY = 2; //耗能单位 //public static final Integer ORG_UNIT = 3; public static enum ORG_TYPE { ORG_GOVERN("1"), ORG_ENER…

2013-08-15 17:59 · Java Basic · 评论(0)

maven项目中部署项目到远程Tomcat服务器

pom配置 <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <configuration> <url>http://192.0.0.203:8080/manager/text</url> <server>server203</server> <path>/energy</path> </configuration> </plugin> setting.xml <server> <id>unknown<…

2013-08-15 14:52 · Developer Tools · 评论(0)

hibernate4调用存储过程

* Hibernate, Relational Persistence for Idiomatic Java * * Copyright (c) 2007-2011, Red Hat Inc. or third-party contributors as * indicated by the @author tags or express copyright attribution * statements applied by the authors. All third-party contributions are * distributed under license by Red …

2013-08-14 18:24 · S2SH FrameWork · 评论(1)

oracle函数返回结果集

参考资料 http://blog.csdn.net/feiliu010/article/details/1538822 http://database.51cto.com/art/201004/194462.htm http://www.cnblogs.com/JavaCharp/archive/2010/03/26/1697266.html http://log-cd.iteye.com/blog/411123 基本上是用的都是管道,实际上也可以返回一个table的类型 create or replace type t_table is table of N_H_table create …

2013-08-13 15:28 · Database · 评论(0)

Mybatis与Hibernate共存项目调用存储过程

项目中同时使用Hibernate(用于权限的基础框架)+Mybatis(业务开发),最近用到Mybatis调用存储过程,这下问题可来了。 开始在junit里面测试,不行,一直有一个空指针。 junit的配置类 package com.rixing; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestExecutionListeners; import org.spri…

2013-08-13 15:16 · Database · 评论(0)

springmvc 使用中遇到的问题

1、Name for argument type [java.lang.String] not available, and parameter name information not found in class file either 解决办法: http://jinnianshilongnian.iteye.com/blog/1705701 eclipse默认是debug级别的函数里面的参数名保留,但是ant编译就不行了。可以使用javac debug=true 要不就是写全@RequestParam的参数 public String requestparam2(@RequestPa…

2013-08-07 18:49 · S2SH FrameWork · 评论(0)

maven jetty 插件的配置

maven jetty 插件的配置 jeety7和jeety9的配置有很大区别,看下面 <!-- jetty 7插件, 设定context path与spring profile <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>${jetty.version}</version> <configuration> <webAppConfig> <connectorNames> <connectorName>0.0.0.0:8080</connec…

2013-08-06 09:27 · 项目构建 · 评论(0)

maven-jar-plugin 特殊用法

编译构建red5 发现server jar包含了boot里面的类,覆盖默认jar-plugin的打包方式 注意颜色加粗的地方 <plugin> <artifactId>maven-jar-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>default-jar</id> <phase>package</phase> <goals> <goal>jar</goal> </goals> <configuration> <archive> <manifest> <addDefaultImplementat…

2013-08-04 18:20 · 项目构建 · 评论(1)

JVM Crash 学习分析

遇到如下错误 # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (ad_x86_32.cpp:879), pid=26139, tid=1847638928 # Error: Unimplemented() # # JRE version: 6.0_21-b06 # Java VM: Java HotSpot(TM) Server VM (17.0-b16 mixed mode linux-x86 ) # If you would like to submit a b…

2013-07-28 17:17 · Java Basic · 评论(0)

Spring的 classpath 通配符加载配置文件

classpath:app-Beans.xml 说明:无通配符,必须完全匹配 classpath:App?-Beans.xml 说明:匹配一个字符,例如 App1-Beans.xml 、 App2-Beans.xml classpath:user/*/Base-Beans.xml 说明:匹配零个或多个字符串(只针对名称,不匹配目录分隔符等),例如:user/a/Base-Beans.xml 、 user/b/Base-Beans.xml ,但是不匹配 user/Base-Beans.xml classpath:user/**/Base-Beans.xml 说明:匹配路径中的零个或多个目录,例…

2013-06-24 21:54 · S2SH FrameWork · 评论(0)

Spring加载resource时classpath*:与classpath:的区别

Spring可以通过指定classpath*:与classpath:前缀加路径的方式从classpath加载文件,如bean的定义文件.classpath*:的出现是为了从多个jar文件中加载相同的文件.classpath:只能加载找到的第一个文件. 比如 resource1.jar中的package 'com.test.rs' 有一个 'jarAppcontext.xml' 文件,内容如下: <bean name="ProcessorImplA" class="com.test.spring.di.ProcessorImplA" /> resource2.jar中的package 'com…

2013-06-24 21:52 · S2SH FrameWork · 评论(0)

二代身份证读写遇到的问题

使用了新中新a16d读卡器,据说是最便宜了,也要1.3k了,真不便宜。 在xp上面一切调试好后,在windows 64位上测试。发现不可以使用,安装了64位驱动也不可以。 后来发现可以使用通用的调用方式 http://www.cnblogs.com/name-lh/archive/2006/01/28/324003.html 测试了确实是可以的。 分析应该是新中新提供的dll不支持64位系统,搜索了一下SynIDCardAPI.dll。找到一个了,居然 推荐这个网站 http://www.dllbang.com/ 使用新的dll,64位和32位通用了。

2013-06-09 16:14 · 杂记 · 评论(0)

springmvc 返回json格式错误

返回格式为 "{\"code\":\"1\",\"message\":\"/upload/2013/065/d304dd96-8c74-43e5-b987-6b99f760be8d.JPG\"}" 可以看出多了“\” 查找原因是只配置了 MappingJacksonHttpMessageConverter 所以我返回json格式类型的字符串,有又经过了一层封装 正确配置 <!-- 处理json --> <bean id="mappingJacksonHttpMessageConverter" class="org.springframework.http.converter.json.Map…

2013-06-05 17:30 · 评论(0)

centos5.5 apache+svn安装配置

系统自带的centos卸载掉。 重新安装参考 http://www.iteye.com/topic/470516 http://www.cnblogs.com/dengqiye/archive/2009/07/11/1521464.html http://read.newbooks.com.cn/info/181191.html http://altand.iteye.com/blog/1275383 http://tonyty163.blog.51cto.com/721698/758835 安装到最后,可以运行了。但是无论怎样都是403的错误,郁闷死了。 后来发现是authz.conf,就…

2013-04-28 23:04 · 评论(0)

flex 递归树

import mx.collections.ArrayCollection; private var treeData:ArrayCollection=new ArrayCollection([ {id: 0,pid:-1,text:'0(0级)'}, {id: 1,pid:0,text:'1(一级)'}, {id: 2,pid:4,text:'2.1.1(三级)'}, {id: 3,pid:0,text:'2(一级)'}, {id: 4,pid:3,text:'2.1(二级)'}, {id: 5,pid:0,text:'3(一级)'}, {id: 6,pid:5,text:'3.1(二级)…

2013-04-28 22:56 · Flex · 评论(0)