自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

转载 struts2创建actioncontext源码分析图

public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {//创建actioncontext的方法 prepare.createActionContext(request, response);}

2017-01-06 14:16:43 404

转载 算法练习

求s=a+aa+aaa+aaaa+aa…a的值,其中a是一个数字。例如2+22+222+2222+22222(此时共有5个数相加),几个数相加有键盘控制。public class exerse6{ static long a =2;b=0; public static void main(String [] args){ Scanner s = new Scanner

2016-12-26 17:30:33 326

转载 欢迎使用CSDN-markdown编辑器

欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl

2016-12-26 17:22:39 768

原创 算法练习-水仙花数

如果一个三位数等于其百位数的三次方、十位数的三次方、个位数的三次方之和,则称这个三位数为水仙花数。题目:打印出所有水仙花数。public class exercise2(){public static void main(String [] args){int b1 =0;int b2 =0;int b3 = 0;for(int i=101; ib1 = i/100

2016-12-22 15:54:25 508

原创 学习笔记:spring与hibernate整合(采用aop来管理事务来实现声明式事务)

step1:加入jar包,spring-3.2-aop.jar  spring-3.2-persistence.jar   c3p0.jarstep2:配置数据源 com.mchange.v2.c3p0.combopooledDatasourcestep3:用LocalsessionFactoryBean 代替 hibernate templatestep4:配置事务管理器管理sess

2016-12-22 09:37:34 698

原创 Hibernate4.0取消hibernate template的原因

为什么hibernate template这么方便的类要取消呢?hibernate template其实就是一个包装类,对数据的增删改查其实是调用了session来实现的,它的一个最致命的缺点是 它来自spring包,如果用hibernate template来实现dao,将来如果不需要spring了,问题就麻烦了,也就是说hibernate template有侵入性,所以它被取消了。

2016-12-21 16:40:54 1455

原创 hibernate环境搭建细节

hibernate环境搭建步骤:1、添加jar包和相应的配置文件 2、根据配置文件加载sessionfactory,并创建session。3、生成pojo以及相应的映射文件(可以使用db browser 逆向生成pojo和映射文件,并且映射文件自动添加到hibernate的配置文件中去)4、创建service执行数据写入(注意事项:使用javaEE6时,出现unable t

2016-12-20 23:15:20 252

原创 spring环境搭建细节

大致步骤:1、添加spring的jar包和spring的配置文件(spring配置文件添加可以用spring包里自带的,也可以用myeclipse 了的add spring capablities 选项添加配置文件,如果spring使用的3.0就不能添加4.0的配置文件,dtd会报错)2、将java.util.date注入service类检测spring是否成功配置,通过spring  jun

2016-12-20 22:59:48 311

转载 hibernate配置文件相关配置

org.hibernate.dialect.MySQL5InnoDBDialect  true true  update

2015-10-15 20:08:07 213

转载 在spring中编写junit测试单元

import javax.annotation.Resource;import org.junit.Test;import org.junit.runner.RunWith;import org.springframework.test.context.ContextConfiguration;import org.springframework.test.context.

2015-09-16 18:09:56 312

转载 spring配置文件模板

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      xmlns:context="http://www.springframework.org/schema/context"       xsi:schemaLocation="http://www.springframework.org/schema/beans

2015-09-16 15:32:03 339

转载 Mysql的jdbc.properties模板

classDriver=com.mysql.jdbc.Driverurl=jdbc:mysql://localhost:3306/testusername=rootpassword=root

2015-09-16 15:30:47 442

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除