one-to-one一对一......单向外键关联1)annotation方式:在加入外键(即加入引用的一方)的实体类的类名上加@Entity ;在主键的get方法上加@id @GeneratedValue ; 在体现关系的外键属性上加 @onetoone和 @JoinColumn(name=”添....
分类:
其他好文 时间:
2014-12-11 15:24:26
阅读次数:
254
一、编写Dao类?1234567891011package cn.com.songjy.annotation;import java.util.Date;public class MyDao {public String time(){return "你好,现在的时间是:" + new Date()...
分类:
编程语言 时间:
2014-12-11 15:15:57
阅读次数:
239
AOP是什么?AOP(Aspect-Oriented Programming),面向切面编程,看着是跟OOP(面向对象编程)挺相近的,但实际上又有什么区别呢?OOP具有封装,继承,多态等东西来定义从上到下这种层次关系,但要想实现从左到右的关系的话就开始有点水土不服了,例如用户的权限控制,操作日志等,...
分类:
其他好文 时间:
2014-12-11 13:57:02
阅读次数:
163
****************注:该文章来自博客园,转载只为保存,便于查询。**********************org.springframework.aop ——Spring的面向切面编程,提供AOP(面向切面编程)的实现org.springframework.asm——spring 2...
分类:
编程语言 时间:
2014-12-11 13:39:55
阅读次数:
151
1. 基本语法? Java代码? import?java.lang.annotation.ElementType;??
import?java.lang.annotation.Target;??
//?The?@Bind?tag.??
@Target(ElementType.METHOD)??
@Retention(RetentionPolicy.R...
分类:
编程语言 时间:
2014-12-11 12:34:28
阅读次数:
194
最近在来到一个新公司,使用新的spring3,hibernate4框架,在使用注解事务总是不起作用。首先看配置文件,然后再讲解。首先是springmvc-servlet.xml,这个配置文件是servlet的加载文件,引用这个文件的位置是在web.xml里 sprin...
分类:
编程语言 时间:
2014-12-11 00:12:11
阅读次数:
347
首先顶一个切面类
@Aspect
@Component
用以...
分类:
编程语言 时间:
2014-12-10 19:56:18
阅读次数:
184
被调用app配置 -(BOOL)application:(UIApplication*)applicationopenURL:(NSURL*)urlsourceApplication:(NSString*)sourceApplicationannotation:(id)annotation {} ....
分类:
移动开发 时间:
2014-12-10 15:52:04
阅读次数:
200
1 package com.sixin.view; 2 3 import com.sixin.utile.FaceDataUtil; 4 import android.annotation.SuppressLint; 5 import android.content.Context; 6 imp.....
分类:
其他好文 时间:
2014-12-10 12:09:06
阅读次数:
162
A、@Autowiredorg.springframework.beans.factory.annotation.Autowiredpublic @interface AutowiredMarks a constructor, field, setter method or config metho...
分类:
其他好文 时间:
2014-12-10 12:04:05
阅读次数:
134