java
aigo6
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
javascript helloworld 及数组
1.javascript的输出2.javascript数组翻译 2016-09-08 20:09:51 · 411 阅读 · 0 评论 -
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 · 491 阅读 · 0 评论 -
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 · 396 阅读 · 0 评论 -
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 · 1276 阅读 · 0 评论 -
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 · 955 阅读 · 0 评论 -
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 · 606 阅读 · 0 评论 -
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 · 1737 阅读 · 0 评论 -
tomcat 使用问题
出现错误如下:原创 2015-11-06 16:43:46 · 396 阅读 · 0 评论 -
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 · 6062 阅读 · 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 · 533 阅读 · 0 评论 -
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 · 365 阅读 · 0 评论 -
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 · 592 阅读 · 0 评论 -
html引用css
1.创建动态web工程新建first.jsp文件在body中写入代码,在head标签中引入css文件,如图所示2.css文件内容如图所示翻译 2016-09-08 16:41:25 · 456 阅读 · 0 评论 -
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 · 4408 阅读 · 0 评论 -
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 · 372 阅读 · 0 评论 -
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 · 793 阅读 · 0 评论 -
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 · 376 阅读 · 0 评论 -
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 · 517 阅读 · 0 评论 -
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 · 573 阅读 · 0 评论 -
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 · 641 阅读 · 0 评论 -
tomcat 无法启动
tomcat启动时提示8088,8009两个端口被占用,无法启动分析:电脑、eclipse中各装有一个tomcat,其中eclipse中是插件必然有一个Tomcat占用了端口号。1.于是修改电脑中安装tomcat的conf目录下的server.xml文件,修改8088、8009为其他端口号。再次运行,发现tomcat仍然无法启动2.打开任务管理器,删除tom原创 2015-11-09 17:01:11 · 397 阅读 · 0 评论 -
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 · 942 阅读 · 0 评论 -
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 · 1123 阅读 · 0 评论 -
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 · 619 阅读 · 0 评论 -
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 · 2522 阅读 · 0 评论 -
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 · 1453 阅读 · 1 评论 -
java hashCode
" hashcode是一种编码方式,在Java中,每个对象都会有一个hashcode,Java可以通过这个hashcode来识别一个对象。"我的理解hashcode是对象的哈希值转载地址:http://blog.youkuaiyun.com/fenglibing/article/details/8905007看以下的运行错误代码:import java.util.HashSet转载 2015-06-03 13:51:23 · 571 阅读 · 0 评论 -
java 父类 子类 无参构造函数调用
public class Parent {public Parent() {System.out.println("parent");}}public class Child extends Parent {public Child() {System.out.println("child");}public static void ma原创 2015-05-22 10:28:50 · 748 阅读 · 0 评论 -
java ButtonGroup及JRadioButton用法
package com.xinhua.testswing;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.ItemEvent;import java.awt.event.ItemListener;import javax.sw原创 2015-05-31 19:38:01 · 24369 阅读 · 1 评论 -
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 · 4731 阅读 · 0 评论 -
java 绝对布局及添加按钮文本框
package com.xinhua.testswing;import java.awt.Container;import java.awt.FlowLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;翻译 2015-05-26 18:47:32 · 5199 阅读 · 0 评论 -
java 从键盘读取字符串
public class TestScanner {public static void main(String[] args) {Scanner s = new Scanner(System.in);System.out.println("输入字符串");while (true) {String line = s.nextLine();if (line.equ转载 2015-05-20 19:53:26 · 1031 阅读 · 0 评论 -
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 · 465 阅读 · 0 评论 -
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 · 826 阅读 · 0 评论 -
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 · 530 阅读 · 0 评论 -
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 · 322 阅读 · 0 评论 -
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 · 3314 阅读 · 1 评论 -
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 · 264 阅读 · 0 评论 -
解决使用Eclipse中调用javadoc的问题
转载地址:http://blog.163.com/logowx@126/blog/static/6256726420096259420870/转载 2015-07-17 14:23:49 · 429 阅读 · 0 评论 -
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 · 5440 阅读 · 0 评论
分享