上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 43 下一页
摘要: 同义词: -- e是scott.emp表的临时别名 select e.* from (select * from scott.emp) e; --创建私有同义词 create synonym myemp for scott.emp; select * from system.myemp; --创建公有同义词 create public synonym pub_emp for ... 阅读全文
posted @ 2016-12-31 10:00 ATJAVA 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Date类 在JDK1.0中,Date类是唯一的一个代表时间的类,但是由于Date类不便于实现国际化,所以从JDK1.1版本开始,推荐使用Calendar类进行时间和日期处理。这里简单介绍一下Date类的使用。 1、使用Date类代表当前系统时间 Date d = new Date(); System.out.p... 阅读全文
posted @ 2016-12-30 12:30 ATJAVA 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 字符串型转换成各种数字类型: String s = "169"; byte b = Byte.parseByte( s ); short t = Short.parseShort( s ); int i = Integer.parseInt( s ); long l = Long.parseLong( s ); Float f = Float.parseFloat( s ); ... 阅读全文
posted @ 2016-12-30 12:06 ATJAVA 阅读(222) 评论(0) 推荐(0) 编辑
摘要: import java.util.Stack; public class StringReverse { public static String reverse1(String s) { int length = s.length(); if (length = 0; i--) reverse += array[i]; return reverse; } publ... 阅读全文
posted @ 2016-12-30 10:19 ATJAVA 阅读(197) 评论(0) 推荐(0) 编辑
摘要: biz包: package com.etc.biz; import java.util.List; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; import com.etc.entity.Animal; public interface AnimalBiz { List findAll... 阅读全文
posted @ 2016-12-29 18:45 ATJAVA 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 1 spring的概念 (spring:ioc对象工厂+aop。) apache推出的java企业框架,提供了基于ioc的对象工厂、aop功能及其他增强功能。 2 控制反转(ioc):inversion of control。 削减计算机程序的耦合问题 控制反转一般分为两种类型,依赖注入(Depen 阅读全文
posted @ 2016-12-29 17:18 ATJAVA 阅读(157) 评论(0) 推荐(0) 编辑
摘要: --删除主键alter table 表名 drop constraint 主键名--添加主键alter table 表名 add constraint 主键名 primary key(字段名1,字段名2……)--添加非聚集索引的主键alter table 表名 add constraint 主键名 阅读全文
posted @ 2016-12-29 16:51 ATJAVA 阅读(246) 评论(0) 推荐(0) 编辑
摘要: (1) 寄存器。这是最快的保存区域,因为它位于和其他所有保存方式不同的地方:处理器内部。然而,寄存器的数量十分有限,所以寄存器是根据需要由编译器分配。我们对此没有直接的控制权,也不可能在自己的程序里找到寄存器存在的任何踪迹。 (2) 栈(stack)。存放基本类型的变量数据和对象的引用,但对象本身不 阅读全文
posted @ 2016-12-29 11:10 ATJAVA 阅读(227) 评论(0) 推荐(0) 编辑
摘要: AOP(Aspect Oriented Programming的缩写)所用的思想其实和设计模式是一样的,即在不修改原代码的情况下统一增加或者修改功能。还有,AOP大多用在spring里面。 AOP是面向切面的编程,通过预编译方式和运行期动态代理实现程序功能的统一维护的一种技术。AOP是OOP的延续, 阅读全文
posted @ 2016-12-28 19:09 ATJAVA 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 第一种:注解配置AOP 注解配置AOP(使用 AspectJ 类库实现的),大致分为三步: 1. 使用注解@Aspect来定义一个切面,在切面中定义切入点(@Pointcut),通知类型(@Before, @AfterReturning,@After,@AfterThrowing,@Around). 2. 开发需要被拦截的类。 3. 将切面配置到xml中,当然,我们也可以使用自动扫描Bea... 阅读全文
posted @ 2016-12-28 18:20 ATJAVA 阅读(256) 评论(0) 推荐(0) 编辑
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 43 下一页