小编Mar*_*ing的帖子

Java注解组合,重用属性

我想做这样的事情:

@QueryHints(@QueryHint(name = "org.hibernate.fetchSize", value = FetchSize.value()))
@Target({ })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface FetchSize {
    String value();
}
Run Code Online (Sandbox Code Playgroud)

不起作用的部分是value = FetchSize.value()。我想将 @FetchSize 中的值属性传递给目标注释@QueryHint,以便我可以像这样注释:

@FetchSize("1000")
Run Code Online (Sandbox Code Playgroud)

类似的事情是否可能以某种方式实现,我将如何使其发挥作用?

java annotations composition

5
推荐指数
1
解决办法
2716
查看次数

我可以在Tomcat 8.0.x上部署spring-boot 2.0 WAR吗?

spring-boot 2.0已经推出一周了.博客文章提到现在有嵌入式tomcat的Tomcat 8.5基线.

这是否意味着如果我使用spring-boot 2.0应用程序的WAR部署,或者Tomcat 8.0.x仍然有用,我需要拥有Tomcat 8.5?

tomcat8 spring-boot

1
推荐指数
1
解决办法
1728
查看次数

标签 统计

annotations ×1

composition ×1

java ×1

spring-boot ×1

tomcat8 ×1