- 博客(38)
- 收藏
- 关注
原创 eclipse 关闭自动加载(重启),使用jreloader更新代码,减少重启次数。
前言:eclipse+tomcat默认情况下,每次修改代码都会自动重启,浪费时间。一、关闭tomcat自动重启。1.找到tomcat /conf/context.xml中,把reloadable="true" 改成false2.把server.xml中的reloadable也改成false。二、使用jreloader。1.下载jreloaderhttp://downlo
2015-08-26 11:50:54
732
原创 eclipse+webservice (tomcat8.0+web2.5)。
先按照这个做:http://blog.csdn.net/xw13106209/article/details/7049614/其中Axis2版本选择1.6.1tomcat选择8.0不要创建java Project,选择Dynamic Web project。web版本不能选择3.1,要选择2.5。建完之后直接在浏览器访问localhost:8080/WebService 便可。
2015-08-25 17:11:39
608
原创 java数据结构(三)排序
一、简单排序。1.冒泡排序。2.选择排序。3.插入排序。4.对象排序。二、高级排序。1.希尔排序。2.划分。3.快速排序。4.基数排序。
2015-08-24 17:18:34
363
原创 java数据结构学习笔记(二)数组
一、java中数组的基础知识。在java中,数组并不是基本数据类型,而是对象,所以需要使用new 来创建。int[] intArray;intArray=new int[100];数组有一个length字段,可以获得当前数组大小。int length=intArray.length;数组一旦创建,大小就不能修改。使用下面的语句,可以对一个基本类型的数据进行初始化,
2015-08-24 17:05:00
375
原创 java数据结构学习笔记(一)综述
一、数据结构的概述。数组 优点:插入块,如果知道下标可以非常快地存取。缺点:查找慢,删除慢,大小固定。有序数组 优点:比无序数组查找快。缺点:删除和插入慢,大小固定。栈 优点:提供后进先出的存取。缺点:存取其他项很慢。队列 优点:提供先进先出方式的存取。缺点:存取其他项很慢。链表 优点:插入块,删除快。缺点:查找慢。二叉树 优点:查找,插入,删除都快(如
2015-08-24 15:56:23
344
原创 Servlet源码理解。深入分析。
一般写servlet只需要继承HttpServlet类,重写doGet/doPost方法。包含了Servlet生命周期4要素:创建(构造器),初始化(init),运行(service),销毁(destory)要想了解Servlet,必须先了解两个类:javax.servlet.Servlet.(接口)javax.servlet.http.HttpServlet(抽象
2015-08-19 16:33:21
486
原创 Spring Mvc 源码理解。
前因:发现springMvc可以使用spring中的bean,way?一。SpringMvc的入口分为 init() 和 service() 两个入口。1.init()仅在DispatherServlet创建的时候执行一次,为容器和组件做初始化。2.service()方法在每次http请求的时候都执行。这里必须先了解servlet的原理。
2015-08-19 15:29:05
458
转载 java-反射 基础
原文:http://blog.csdn.net/liujiahan629629/article/details/18013523一,常用的类。java.lang.Class; java.lang.reflect.Constructor; java.lang.reflect.Field; java.lang.reflect.
2015-08-12 17:01:41
314
转载 java反射,获得Class是否为基本数据类型,是否其他类的父类。获得泛型。
原文:http://blog.csdn.net/is_zhoufeng/article/details/7629931Class c = ArrayList.class;c.isPrimitive(); //判断c是否为基本数据类型c.isAssignableFrom(List.class); //判断c是否是List类的子类或父类c.getGenericTy
2015-08-12 15:43:14
761
原创 jquery post error
$.post("http://localhost:8080/codedictWebService/findCodedict", { id : id }, function(data) { $("#findCodedictid").val(data.id); $("#findCodedictccatalog").val(data.ccatalog); $("#findCo
2015-08-07 17:37:50
805
原创 maven中使用spring的test包结合junit4进行测试。
1.先在src/test/resources中加入spring的配置文件spring.xml2.引入maven org.springframework spring-test test 3.进行测试。package junit.test;import java.io.File;import java.io.FileInputStream;imp
2015-08-04 17:39:08
15395
原创 Eclipse 导入 cas-server-core3.5.1报错 CDI xxx El xxx
修改.classpath文件和.project文件。.classpath: .project cas-server-core org.eclipse.wst.common.project.facet.
2015-08-03 17:18:11
589
原创 cas login-webflow.xml分析。关于TGT何时生成和存储。
1.执行initialFlowSetupAction的doExecute(final RequestContext context)方法。 参数RequestContext是流程的容器。doExecute方法先设置cookiePath为 /cas/ (默认为 / )。再在 context.getFlowScope()里面保存:ticketGrantingT
2015-07-27 18:00:21
2944
转载 CAS流程源码分析。
参考:http://www.cnblogs.com/AloneSword/p/3360106.html首先是web.xml中的Spring listener: org.jasig.cas.web.init.SafeContextLoaderListener 然后是springmvc的servlet cas org
2015-07-27 16:47:27
977
原创 spring加载bean原理。
Spring管理bean:1.从web.xml里面配置的ContextLoaderListener开始。2.ContextLoaderListener继承ContextLoader3.执行ContextLoaderListener的contextInitialized方法,获得servletContext.4.把servletContext传入ContextLoader的initW
2015-07-23 16:24:03
2955
原创 SpringMvc中静态文件下载。
如果在web.xml配置了 springMVC / web下的所有静态文件都无法访问和下载。在springAnnotation-servlet.xml中增加下面配置 其中必须存在
2015-07-20 15:45:27
983
原创 sprigmvc中jsp页面读取js文件
如题,用相对路径无法读js文件 改成下面这样,就可以了/js/jquery-1.7.2.min.js">
2015-07-16 16:22:40
245
原创 SpringMvc+Spring同时扫描出现问题。
SpringMvc+Spring同时扫描出现问题。会有奇怪的问题。在spring中排除controller 让springmvc只扫描controller
2015-07-16 09:32:29
590
原创 java中各种路径。
1.web根目录。String rootPath=request.getServletContext().getRealPath("/");得到:D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\fileWebService2.classes目录String rootPath
2015-07-15 14:20:00
220
原创 properties操作。
1.读取properties假设properties文件在项目跟目录/classes/path.propertiesString rootPath=this.getClass().getClassLoader().getResource("/").getPath()+"path.properties";Properties pps = new Properties(); Inp
2015-07-15 11:18:02
256
转载 SpringMvc 两种上传。
http://blog.csdn.net/a1314517love/article/details/24183273
2015-07-14 11:42:54
217
转载 修改cas-server(四),增加验证码功能。
(四)跟(三)差不多,直接看这个:http://blog.csdn.net/ae6623/article/details/8919718
2015-07-13 14:35:04
359
原创 修改cas-server(三),自定义登录验证方式。
在修改cas-server(二)中,虽然修改了jdbc,但是还是只能判断用户名/密码。如果需要多增加一个参数,如systemid,则需要修改cas-server-core.jar的源码。参考:http://blog.csdn.net/lovesummerforever/article/details/380233851.修改login-webflow.xml
2015-07-13 11:01:18
1619
转载 修改cas-server(二),修改认证方式为jdbc。
原文:http://blog.csdn.net/ae6623/article/details/8851801一。cas自带验证。只要用户名密码相同就可以的验证。在WEB-INF\deployerConfigContext.xml中<bean class="org.jasig.cas.authentication.handler.support.SimpleTestU
2015-07-10 16:46:38
905
转载 cas 服务端https安装部署。
官网下载cas-server3.5.1.jareclipse导入cas-server-webapp引入依赖 javax.servlet javax.servlet-api provided 3.1.0 javax.servlet.jsp jsp-api 2.1 provided 删除test目录下的
2015-07-10 11:48:44
325
原创 cas-server异常不会后台显示而是变成json显示在页面。
cas-server异常不会后台显示而是变成json显示在页面。找到/cas-server-webapp/src/main/webapp/WEB-INF/spring-configuration/applicationContext.xml中id为/jsonExceptionResolver的bean注销掉。异常就会直接显示在console。
2015-07-07 16:00:13
630
原创 让jsp页面不缓存验证码图片。
1.先试试网上的方法:response.setHeader("Pragma","No-cache");response.setHeader("Cache-Control","no-cache");response.setDateHeader("Expires", -10);%>或者<meta HTTP-EQUIV="pragma" CONTENT="no-cac
2015-07-07 11:41:09
1057
转载 修改cas-server3.5.1(一) cas取消https方法配置。
原文:http://www.coin163.com/java/docs/201305/d_2795028902.html需要修改的配置文件有:WEB-INF/deployerConfigContext.xml 、 WEB-INF/spring-configuration/ticketGrantingTicketCookieGenerator.xml 、WEB-INF\spr
2015-07-06 15:25:42
498
原创 maven下载中断。
maven下载一半中断之后,.m2/repository里面会有*.lastUpdated文件,之后就不会再下载又有问题。执行下面bat删除lastUpdate:@echo offrem create by sunhao(sunhao.java@gmail.com)rem crazy coder rem 这里写你的仓库路径set REPOSITORY_PATH=E:\d
2015-06-25 17:10:29
3040
转载 eclipse各种卡各种问题。
转自:百度知道1.启动eclipse时一直卡在loading org.eclipse.ui.editors打开 :工作空间\.metadata\.plugins\org.eclipse.core.resources\.projects 删除里面除了RemoteSystemsTempFiles的东西。2.eclipse 卡在 initremoteeditjob移除工作空间目录
2015-06-25 14:44:32
792
转载 cas4.0.1源码各种错误。
转载:http://my.oschina.net/u/732798/blog/362147?p={{page}}http://blog.csdn.net/yanjunlu/article/details/454985091.错误:cvc-complex-type.3.2.2: Attribute 'local' is not a换成具体原因不详。。2.错误:
2015-06-25 10:23:11
917
原创 cas maven install 报错 Invalid byte tag in constant pool: 15
找到tomcat web.xml修改:<web-app version="3.0" 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
2015-06-24 10:43:08
2014
原创 线程Thread。
1.创建线程。2.开启线程。3.停止线程。使用thread.interrupt();不使用thread.stop();这个方法不推荐使用,因为stop和suspend、resume一样,也可能发生不可预料的结果
2015-06-19 16:10:06
322
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人