- 博客(40)
- 资源 (3)
- 收藏
- 关注
转载 Spring maven打包成jar和war
这篇文章说的比较清楚http://docs.spring.io/spring-boot/docs/current/reference/html/build-tool-plugins-maven-plugin.html
2015-11-20 23:36:53
514
原创 Spring rest 启动报错的一种可能性
出现如下报错信息org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/home/chanllen/.m2/repository/org/springframework/boot/spring-boot
2015-11-02 07:54:19
5756
原创 java.lang.AbstractMethodError: 的一种错误可能
type Exception reportmessage java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;description Th...
2015-07-19 02:59:46
36166
翻译 安装 gevent linux
amazon ami: http://stackoverflow.com/questions/22995559/installing-gevent-on-centos-error-gccubuntu: http://stackoverflow.com/questions/11094718/error-command-gcc-failed-with-exit-status-1-while-in
2015-07-07 07:54:31
1843
翻译 hadoop 不使用hostname,使用ip遇到的问题(Datanode denied communication with namenode because hostname cann)及解决方案
“Hadoop provides a mechanism to prevent unauthorized access. User can add hosts.deny and hosts.allow files to limit the access to a hadoop cluster. When a data node joins the name node, the name node
2015-04-12 05:47:38
7988
2
原创 tomcat 读取文件,获取相对路径
在webroot下有一个叫list.txt 的文件,不能用普通java程序的方法来获取,需要采用以下代码String relativePath = "list.txt";String absoluteDiskPath = getServletContext().getRealPath(relativePath);File file = new File(absoluteDiskPath
2015-03-27 11:07:13
2580
1
原创 Java array[][] .clone() 二维数组和一维数组不同
二维数组若想达到一维数组的clone()的效果,不能简单的, array.clone();而是需要实现新的方法,如下: public boolean[][] clone(boolean array[][]){ boolean[][] result = new boolean[array.length][array[0].length]; for(int i = 0;i
2015-01-29 11:12:55
515
原创 Java Long 在Integer的overflow的范围overflow
为了防止Integer overflow。利用long存储数据public int reverse(int x) { ArrayList list = new ArrayList(); while( x != 0){ list.add(x % 10); x /= 10; }
2015-01-11 04:58:40
1861
原创 js值过长,末尾为0
当一个json的数字535860976793706496传入js后,由于js的数字最多就只能保存17位数字,所有要将这个json的类型改为string也就是改为"535860976793706496"
2014-12-04 03:00:50
2476
翻译 Mysql create table Error:1005
I realize this is an old post, but it ranks high in Google, so I'm adding what I figured out for MY problem. If you have a mix of table types (e.g. MyISAM and InnoDB), you will get this error as wel
2014-11-04 08:40:01
392
原创 java.net.SocketException: Broken pipe
使用Hibernate java.net.SocketException: Broken pipe
2014-11-04 04:50:35
450
原创 js document.getElementIdBy 取不到值的一种可能 onLoad
var attrName = ["入库单编号 ","入库时间","入库数量","商品编号"];var attrValue = ["in_code","inDate","goodsCode","in_quan"];for(var i = 0;i document.getElementById("op").options.add(new Option(attrName
2014-06-02 19:42:21
3350
转载 Spring 3 MVC And XML Example springmvc3 返回XMl
In Spring 3, one of the feature of “mvc:annotation-driven“, is support for convert object to/from XML file, if JAXB is in project classpath.In this tutorial, we show you how to convert a return
2014-04-20 13:38:53
470
原创 Mysql Timestamp 总是最新的 须注意onupdate
在mysql 中Timestamp须注意其中的on update选项,若选中,则会更改为新的插入时的时间
2014-03-28 15:45:23
498
原创 spring3 mvc中 web.xml 加入 OpenSessionInView
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_
2014-03-28 10:37:35
452
转载 spring getHibernateTemplate() 返回null的问题
public class BasicDAOImpl extends HibernateDaoSupport implements BasicDAO{ public List findByHql(String hql)throws DataAccessException{ System.out.println("1111111111111"+getHi
2014-03-27 12:46:24
1769
转载 springMVC js等文件找不到错误
应用springMVC时如果配置URL映射时如下配置[html] appServlet org.springframework.web.servlet.DispatcherServlet contextConfigLocation /WEB-INF/spring/
2014-03-18 17:59:13
594
转载 json异常处理org.json.JSONException: No value for XXX
最近呢遇到一个问题,就是得到的一个json数据object可能不是最最完全的一个类的数据,那么怎么面对那个02-19 23:29:22.531: W/System.err(13955): org.json.JSONException: No value for larPhoto异常呢?开始的时候,我想,只要报异常就不取值,就行了,但是一想实在是麻烦,如果一个类中有几十个属性和其他的
2013-11-12 13:51:57
3171
原创 mysql sql总出错的一种可能 mysql关键字
以下是mysql的保留关键字ADDALLALTERANALYZEANDASASCASENSITIVEBEFOREBETWEENBIGINTBINARYBLOBBOTHBYCALLCASCADECASE
2013-11-10 14:30:48
786
原创 ActionContext.getContext()传值的三种方式,和session取到值而request去不到值的一种可能
后台 ActionContext.getContext().put("greeting") 前台 ${requestScope.greeting} 后台 ActionContext.getContext().getSessio().put("greeting") 前台 ${sessionScope.greeting}后台 ActionContext.getContext().
2013-11-04 19:23:42
1876
转载 eclipse 生成可运行JAR包并引入第三方包
eclipse 生成JAR包并引入第三方包本文转自:http://ganlangreen-163-com.iteye.com/blog/1087484首先用eclipse生成JAR一、生成JAR包1、点选项目右键—>Export2、Java—>JAR file—>Next 3、选中项目 选中
2013-11-02 21:02:19
508
转载 JAVA,JS替换字符串反斜杠
将 \ 替换成 \\ file_name= file_name.replaceAll("\\\\","\\\\\\\\");将 \ 替换成/ name= name.replace('\\','/');
2013-11-01 17:23:13
660
原创 javascript无效问题
今天写了个简单的js的function select(){} 但是无论怎么修改函数体就进不去。后来发现,因为同时引入了其他的js,而与selelct这个名字有冲突,导致调用无效,所以在有多个js引入文件时,起名须谨慎!把select改为其他名字即可
2013-11-01 15:11:32
1035
转载 java文件读写操作大全
java文件读写操作大全转自http://blog.sina.com.cn/s/blog_4a9f789a0100ik3p.html 一.获得控制台用户输入的信息 public String getInputMessage() throws IOException...{ System.out.println("请输入您的命令∶");
2013-10-30 16:55:39
309
原创 mSearch.drivingSearch 无法获取路线
今天犯了一个低级错误,记录一下。在做安卓开发的时候利用到百度api的内容,其中有一条mSearch.drivingSearch("北京", stNode, "北京", enNode,wpNodes)的方法,通过发送网络请求,获取路线。在测试的时候,发现经常获取不到路线,当时以为和所输入的点有关,后来才发现和网络有关的函数,应当这么写while(mSearch.drivingSearch("北京",
2013-10-23 17:16:09
1808
转载 The import ... cannot be resolved
大量的The import ... cannot be resolved问题,有很多很多错,在网查到“The import cn cannot be resolved 我自己写的类 出现一个灵异问题,突然导入的类报错,可是那个类是好好的啊。然后谷歌一下,试了一下project-->clean后,问题得到解决。
2013-10-14 10:49:25
782
原创 hibernate mysql 谨慎使用mysql关键字
利用hibernat访问数据库时,谨慎使用mysql关键字作为字段或表明,有些情况下可以采用 在关键字中 加 "[]" .或者 加,``等 ,如column name="[UPDATE]" not-null="false" />但这样有的时候会造成读写错误,即可写不可读等错误
2013-09-26 15:27:46
623
转载 常用sql
1、说明:创建数据库 CREATE DATABASE database-name 2、说明:删除数据库 drop database dbname 3、说明:备份sql server --- 创建 备份数据的 device USE master EXEC sp_addumpdevice 'disk', 'testBack', 'c:mssql7backupMyNw
2013-09-17 10:52:40
490
转载 MySQL中的datetime与timestamp比较
MySQL中的datetime与timestamp比较timestamp和datetime sql插入时需加引号显示TIMESTAMP列的显示格式与DATETIME列相同。换句话说,显示宽度固定在19字符,并且格式为YYYY-MM-DD HH:MM:SS。不同范围datetime 以'YYYY-MM-DD HH:MM:SS'格式检索和
2013-09-11 15:03:48
577
原创 java.util 部分心得
linked list 1、双链表形式 2、易添加删除元素 3、不同步 4、不支持快速地随机访问hashset 1、无顺序 2、查询速度快(contains())3、插入速度快 4、可放入1个nulltreeset 1、插入速度慢于hashset,快于list 2、不可放入nullhashset VS treeset hashset 性能更优,但须实现hashcode()和equal(
2013-09-06 15:25:16
414
原创 spring mvc @Qualifier注解接口来注入 @Service
如UserInfoService为接口 UserInfoServiceImpl 为其实现类 @Autowiredprivate UserInfoService userInfoService;此时@autowried通过默认Bytype注释,成功此时若增加StudentServiceImpl实现UserInfoService接口,则需要通过@Qualif
2013-09-04 17:58:32
4101
原创 换行符和 “Note that your output did not end in a newline”
自己没事儿的时候在弄 USACO 的题,用java写结果都正确就是总提醒 结果需要另起一行 “Note that your output did not end in a newline”上网搜需加上out.write("\r\n");本机可以换行,但提交代码后,显示结果依然错误,没有换行而是变成了"@"后来经搜索明白了,不同系统的换行符也不一样所以应该通过System.get
2013-09-01 12:07:26
981
转载 提交表单时,是按input的name而不是按id
表单(form)的控件名,提交的数据都用控件的name而不是id来控制。因为有许多name会同时对应多个控件,比如checkbox和radio,而id必须是全文档中唯一的。此外浏览器会根据name来设定发送到服务器的request。因此如果用id,服务器是无法得到数据的。
2013-08-29 11:27:58
1158
原创 关于java以对象为参数传值问题
对于java参数传值问题一直有些模糊,通俗的是原始类型,如int,double 是不可更改原值的,若是传入的是对象则可以更改它的属性。今天调bug就遇到了这么一个问题,于是做了以下测验public class sendValueTest {public void nullize(Point p){p.x = 1;p.y = 2;p = nul
2013-08-21 15:02:04
758
原创 spring mvc前台取不到后台@ModelAtttribute的一种情况
如以下代码片段@RequestMapping(value="/userInfo")public ModelAndView getUserInfo(@ModelAttribute("account") Account account, HttpServletRequest request, HttpServletResponse respon
2013-08-21 10:54:34
2139
转载 遇到错误 org.hibernate.HibernateException: identifier of an instance of XXX was altered from X to X 将int
rt
2013-08-19 15:57:08
1249
原创 org.apache.jasper.compiler.TldLocationsCache tldScanJar jsp标签的一个问题
jsp 中id 不能用 如up.name 这种形式,而只能用namee.g.这就错了
2013-08-11 11:50:26
1929
原创 uploadify+struts问题 无法传入action的问题
在struts的action中,若其中有含有upload的函数,则传入action中无反应,而将upload类的名字改成其它的如upform则可以行的通了。
2013-07-22 21:15:10
530
Software Engineering A Practitioner's Approach 7th Edition - Roger Pressman
2014-08-26
基于Socket的局域网络通信软件开发
2012-03-09
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人