@Column标记表示所持久化属性所映射表中的字段,该注释的属性定义如下: @Target({METHOD, FIELD}) @Retention(RUNTIME) public @interface Column { String name() default ""; boolean unique ...
分类:
其他好文 时间:
2017-10-22 22:05:32
阅读次数:
127
一、自定义annotation摘自:http://elim.iteye.com/blog/1812584@Target({ElementType.FIELD,ElementType.METHOD})@Retention(RetentionPolicy.RUNTIME)@Constraint(validatedBy=MinValidator.class)public@interfaceMin{intvalue()default0;Stringmessage();Class<?>[]g..
分类:
其他好文 时间:
2017-10-17 19:57:18
阅读次数:
253
一:自定义注解型1:自定义注解类:@Retention(RetentionPolicy.RUNTIME)
public@interfacepointcutTest{
}2:@Aspect
@Component
@Order(0)
publicclasspointcut{
//此处两种写法
//一:
//@Pointcut("@annotation(application.anntation.pointcutTest)")
//publicvoidpointcut..
分类:
Web程序 时间:
2017-10-12 22:55:40
阅读次数:
654
@RestController实现方式:@Target(ElementType.TYPE)@Retention(RetentionPolicy.RUNTIME)@Documented@Controller@ResponseBodypublic@interfaceRestController{ /** *Thevaluemayindicateasuggestionforalogicalcomponentname, *tobeturnedintoaSpringbeanincaseofanautodete..
分类:
其他好文 时间:
2017-10-12 22:55:12
阅读次数:
300
Normally you declare all the beans or components in XML bean configuration file, so that Spring container can detect and register your beans or compon ...
分类:
编程语言 时间:
2017-10-11 15:35:48
阅读次数:
251
讲解这三行代码的源码。 一 Protocol接口的定义 注意:这里有两个核心注解 @SPI:指定一个接口为SPI接口(可扩展接口) 1 @Documented 2 @Retention(RetentionPolicy.RUNTIME) 3 @Target({ElementType.TYPE}) 4 ...
分类:
其他好文 时间:
2017-10-01 18:34:18
阅读次数:
235
下载http://kafka.apache.org/downloads.htmlhttp://mirror.bit.edu.cn/apache/kafka/0.11.0.0/kafka_2.11-0.11.0.0.tgzroot@master:/usr/local/kafka_2.11-0.11.0.0/config#vimserver.propertiesbroker.id=2每个节点不同log.retention.hours=168message.max.byte=5242880defau..
分类:
系统相关 时间:
2017-09-21 09:49:27
阅读次数:
355
如果没有用来读取注解的工具,那注解将基本没有任何作用,它也不会比注释更有用。读取注解的工具叫作注解处理器。Java提供了两种方式来处理注解:第一种是利用运行时反射机制;另一种是使用Java提供的API来处理编译期的注解。 反射机制方式的注解处理器 仅当定义的注解的@Retention为RUNTIME ...
分类:
编程语言 时间:
2017-09-20 18:01:59
阅读次数:
404
在oracle 10g中,提供了backup ... keep功能来重载配置好的retention策略。 在oracle 11g中,可以重定义backup ... keep命令来创建长期保留的备份,称作archival backups,又叫历史归档备份,目的是将数据库某一时刻数据生成历史备份,备份里 ...
分类:
其他好文 时间:
2017-09-16 20:32:51
阅读次数:
170
它是包含在 java.lang.annotation 包中。 1.元注解是指注解的注解。包括 @Retention @Target @Document @Inherited四种。 1.1、@Retention: 定义注解的保留策略 @Retention(RetentionPolicy.SOURCE) ...
分类:
编程语言 时间:
2017-09-14 18:49:06
阅读次数:
167