角色(用户组),用户多对多。
角色实体配置:
private Set users;
@ManyToMany
@JoinTable(name="t_auth_user_role",joinColumns={@JoinColumn(name="role_id")},inverseJoinColumns={@JoinColumn(name="user_id")})//配置一方
public...
分类:
系统相关 时间:
2014-07-08 18:26:30
阅读次数:
218
第一步:在XML中配置java信息,与自动检测配置XML一样:第二步:定义配置类第三步:声明bean和bean的注入:package com.springinaction.springidol;import org.springframework.context.annotation.Bean;im...
分类:
编程语言 时间:
2014-07-07 20:56:54
阅读次数:
309
以上是工程文件,下面开始测试package test.testservice;import org.junit.Test;import org.junit.runner.RunWith;import org.springframework.beans.factory.annotation.Autow...
分类:
编程语言 时间:
2014-07-07 11:50:50
阅读次数:
163
java代码 1 package com.tgb.web.controller.annotation; 2 3 import javax.servlet.http.HttpServletRequest; 4 5 import org.springframework.stereotype.Cont.....
分类:
编程语言 时间:
2014-07-07 00:19:16
阅读次数:
242
最近在学习中发现相当多的框架是通过注解来实现的。为了加深记忆,把注解重新做一下回顾。
首先注解不是注释。——但因为java语言内置了三个注解:@Override、@Deprecated、@SuppressWarnnings。第一个是通知编译器做方法覆盖检查;第二个是提醒程序员使用了过时的方法;第三个是通知编译器忽略警告。这三个内置注解用起来给人的感觉就象注释一样。而实际上注解的用...
分类:
编程语言 时间:
2014-07-06 10:57:21
阅读次数:
239
例子下载beans.xml 首先,在配置文件配置好下面的配置 其中为声明使用annotation部分,会使得程序运行时进行对com.bjsxt包及子包的扫描操作,对于AOP的annotation来说最为主要,标志着可以使用AOP的annotion来进行操作。Aspectp...
分类:
编程语言 时间:
2014-06-29 06:13:10
阅读次数:
228
postScale:设置图片的缩放packagecom.example.examples_05_09;importandroid.R.integer;importandroid.annotation.SuppressLint;importandroid.content.Context;importa...
分类:
其他好文 时间:
2014-06-26 18:02:00
阅读次数:
153
java用 @interface Annotation{ } 定义一个注解 @Annotation,一个注解是一个类。@Override,@Deprecated,@SuppressWarnings为常见的3个注解。注解相当于一种标记,在程序中加上了注解就等于为程序加上了某种标记,以后,JAVAC编....
分类:
编程语言 时间:
2014-06-25 21:37:54
阅读次数:
319
drawRect:矩形drawCircle:绘制圆形drawOval:椭圆drawPath:任意多边形drawLine:直线drawPoint:绘制点代码示例第一种packagecom.example.examples_05_05;importandroid.annotation.SuppressL...
分类:
其他好文 时间:
2014-06-25 11:24:39
阅读次数:
301
Hibernate 默认总共支持 13 种生成策略 :
1. increment
2. identity
3. sequence
4. hilo
5. seqhilo
6. uuid
7. uuid.hex
8. guid
9. native
10. assigned
11. select
12. f...
分类:
系统相关 时间:
2014-06-17 22:30:41
阅读次数:
450