- 博客(66)
- 资源 (5)
- 收藏
- 关注
原创 vim/linux--快捷键
1. 0:返回行首;end :返回行尾或使用$. o:新起一行 ;把光标放在需要寻找配对的括号上,选择%,可以跳到被配对的括号2. gg:返回文件首;G:返回文件尾;H,跳至当前页页首。L,跳至当前页页未。M,跳至当前页页中间。yw,复制一个单词。 i,在当前字符的左侧开始插入;a,在当前字符的右侧开始插入;I,在当前行行首开始插入;o,在当前行的下一行开始新的一行并在那插入;A,在当前行行尾...
2018-02-13 16:41:06 318
翻译 html引用css
1.创建动态web工程新建first.jsp文件在body中写入代码,在head标签中引入css文件,如图所示2.css文件内容如图所示
2016-09-08 16:41:25 392
原创 spring mvc控制器问题
HTTP Status 500 - Servlet.init() for servlet dispatcherServlet threw exceptiontype Exception reportmessage Servlet.init() for servlet dispatcherServlet threw exceptiondescription The server en
2015-11-10 15:22:07 501
转载 eclipse 运行 动态web工程出错
Could not delete E:/eclipse_work/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/spring-test/WEB-INF/lib. May be locked by another process.1.打开任务管理器,删除tomcat7w.exe进程即可。
2015-11-09 20:24:13 548
原创 spring mvc 错误
HTTP Status 500 - Servlet.init() for servlet dispatcherServlet threw exceptiontype Exception reportmessage Servlet.init() for servlet dispatcherServlet threw exceptiondescription The server en
2015-11-09 17:08:14 524
原创 tomcat 无法启动
tomcat启动时提示8088,8009两个端口被占用,无法启动分析:电脑、eclipse中各装有一个tomcat,其中eclipse中是插件必然有一个Tomcat占用了端口号。1.于是修改电脑中安装tomcat的conf目录下的server.xml文件,修改8088、8009为其他端口号。再次运行,发现tomcat仍然无法启动2.打开任务管理器,删除tom
2015-11-09 17:01:11 331
原创 eclipse web helloworld
eclipse中创建动态web工程1. Java Resource中创建包及类HelloWorldAction类名HelloWorldAction/* * Created on 2006-3-23 * TODO * author:gf */package com.gc.action;import java.io.IOException;imp
2015-11-07 22:12:17 1665
转载 spring aop引子
1.接口类package com.hxzy.aop;public interface ArithmeticCalculator {int add(int i, int j);int sub(int i, int j);int mul(int i, int j);int div(int i, int j);}2.接口的实现类package
2015-10-13 22:07:43 317
转载 spring 泛型依赖注入
泛型依赖注入不是很懂,参考链接http://www.tuicool.com/articles/bIRfUv1.package com.hxzy.generic.di;public class BaseRepository {}2.package com.hxzy.generic.di;import org.spring
2015-10-12 21:48:30 705
转载 spring 注解配置bean2
1.UserService类package com.hxzy.annotation.service;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.beans.factory.annotation.Qualifier;import org.spr
2015-10-11 21:40:42 312
转载 spring 注解配置bean
spring 注解配置bean1.TestObject类package com.hxzy.annotation;import org.springframework.stereotype.Component;//此处的注解Component相当于一个声明,这样在bean配置文件中可以不用再定义bean对象,可直接在测试文件中使用testObject作为bean对
2015-10-09 21:48:17 464
转载 spring FactoryBean
1.car 类package com.hxzy.factorybean;public class Car {private String brand;private String address;public void setBrand(String brand) {this.brand = brand;}public void setAdd
2015-10-08 20:25:59 339
转载 spring 工厂方法配置bean
1.car类package com.hxzy.factory;public class Car {private String brand;private String address;public void setBrand(String brand) {this.brand = brand;}public void setAddress(
2015-10-08 20:23:31 407
转载 spring 生命周期
1.car类package com.hxzy.cycle;public class Car {private String brand;public Car() {System.out.println("构造器运行");}public void setBrand(String brand) {System.out.println("set方法
2015-10-08 15:33:30 300
翻译 spring 使用spel
1.car类package com.hxzy;public class Car {private String brand;private String address;private int speed;private double perimeter;public void setBrand(String brand) {this.brand
2015-10-07 20:51:23 519
翻译 spring 使用外部配置文件访问数据库
1.Caused by: java.lang.ClassNotFoundException: com.mchange.v2.ser.Indirectorat java.net.URLClassLoader$1.run(Unknown Source)at java.security.AccessController.doPrivileged(Native Method)at java.n
2015-10-07 16:10:28 1213
翻译 spring 作用域之单例模式/原型模型
1.配置文件xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
2015-10-06 21:44:09 881
翻译 spring 使用util:list节点 提取公共的bean
1. 配置文件 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:util="http://www.springframework.org/schema/util"xsi:schemaLocation="http://www.springframework.org/schema/beans http://w
2015-10-05 22:53:53 5956 1
翻译 spring Properties作为修饰属性的类型
1.DataSource类import java.util.Properties;public class DataSource {private Properties properties;public void setProperties(Properties properties) {this.properties = properties;}
2015-10-05 22:00:40 477
翻译 spring 集合属性赋值
1.person类package com.hxzy.model;import java.util.List;public class Person {private int age;private String name;private List cars;//此处若没有无参构造方法,bean配置文件中会报错“No constructor
2015-10-05 10:16:14 1057
转载 spring 级联属性
1.People类package com.hxzy;public class People {private String name;private int age;private Car car;//必须有无参构造方法public People() {}public People(String name, int age, Car
2015-09-30 16:57:33 4321
翻译 spring bean中引用bean
1.Person类package com.hxzy.model;public class Person {private int age;private String name;private Car car;//此处若没有无参构造方法,bean配置文件中会报错“No constructor with 0 arguments defined in
2015-09-28 22:08:19 452
翻译 spring 构造注入
1. car类package com.hxzy.model;public class Car {private String brand;private String address;private int speed;public void setBrand(String brand) {this.brand = brand;}publ
2015-09-28 21:45:24 210
翻译 spring helloworld
1.Helloworld类public class Helloworld {private String name;public void setName(String name) {this.name = name;}public void hello() {System.out.println("hello: " + name);}pub
2015-09-28 21:37:51 273
原创 java 图片上写文字
package testLabel;import java.awt.Dimension;import java.awt.Graphics;import java.awt.Image;import java.awt.Toolkit;import java.io.File;import java.io.IOException;import java.util.pre
2015-09-16 11:33:23 870
原创 jsp使用自定义类
1.eclipse中创建server,细节自己查,可以看书2.eclipse中创建动态web 工程,细节查书在WebContent下创建文件index.jsp,内容如下 pageEncoding="ISO-8859-1"%>Insert title hereTest test = new Test();System.out.prin
2015-09-06 21:52:02 3165 1
原创 java 使用JDesktopPane
前提: java工程中src目录下创建文件夹res,其中添加图片文件1.public class TestJDesktopPane extends JFrame {public TestJDesktopPane() {setSize(400, 400);setLocation(200, 100);JPanel panel = new JPanel();p
2015-07-17 17:14:17 5335
转载 解决使用Eclipse中调用javadoc的问题
转载地址:http://blog.163.com/logowx@126/blog/static/6256726420096259420870/
2015-07-17 14:23:49 357
翻译 java 反射使用构造方法
1.package com.xinhua.javaReflect;public class PrivateConstruct {private PrivateConstruct() {System.out.println("无参构造方法被调用");}private PrivateConstruct(int a, int b) {System.out.
2015-07-01 17:24:21 410
翻译 java 反射访问方法
1.待测试类public class Method {static void staticMethd() {System.out.println("执行静态的空方法staticMethd");}public int publicMethod(int i) {System.out.println("执行publicMethod方法");return i * 100
2015-06-15 17:50:51 352
翻译 java 反射访问成员属性
1.待测试类public class MemberVariable {public float floatVar;protected boolean bool;private String str;int intVar;}2.测试类import java.lang.reflect.Field;public class TestMe
2015-06-15 16:56:53 417
翻译 java 反射访问构造方法
1.定义一个类public class TestItem {String s;int i;int i2;int i3;private TestItem(){}protected TestItem(String s, int i) {this.s = s;this.i = i;}public TestItem(String...st
2015-06-15 14:07:25 342
翻译 java 网格组布局
package com.xinhua.gridbaglayout;import java.awt.GridBagConstraints;import java.awt.GridBagLayout;import java.awt.Insets;import javax.swing.JButton;import javax.swing.JFrame;pu
2015-06-11 15:59:09 755
翻译 java 工具栏
package com.xinhua.tool;import java.awt.BorderLayout;import java.awt.Dimension;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;imp
2015-06-09 16:14:02 546
翻译 Java 菜单栏&菜单项
package com.xinhua.menu;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.ItemEvent;import java.awt.event.ItemListener;import javax.swing.J
2015-06-09 14:01:44 1355 1
翻译 java 桌面面板与内部窗体用法
1.内部窗体类package com.xinhua.desktoppane;import java.net.URL;import javax.swing.ImageIcon;import javax.swing.JInternalFrame;//定义一个内部窗体public class TestInternalFrame extends JInter
2015-06-09 13:31:51 2413
转载 java hashCode
" hashcode是一种编码方式,在Java中,每个对象都会有一个hashcode,Java可以通过这个hashcode来识别一个对象。"我的理解hashcode是对象的哈希值转载地址:http://blog.csdn.net/fenglibing/article/details/8905007看以下的运行错误代码:import java.util.HashSet
2015-06-03 13:51:23 505
原创 java CheckBox用法
public class TestCheckBox extends JFrame {public TestCheckBox() {setLayout(new BorderLayout());//声明JTextArea内部占3行10列final JTextArea jt = new JTextArea(3, 10);JScrollPane jsp = new JS
2015-05-31 20:17:34 4634
chromium-browser_22.0.1229.94~r161065-3_all.deb
2012-11-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人