我们将Spring 4.0.1.RELEASE与jdk6结合使用(这是固定的).当然,我们使用@PropertySource注释来完成Java中的配置.当我们使用gradle编译项目时,这会导致恼人的警告消息:
org\springframework\context\annotation\PropertySource.class(org\springframework\context\annotation:PropertySource.class):警告:在类型'java.lang.annotation.Repeatable'中找不到annotat ion方法'value()':class找不到java.lang.annotation.Repeatable的文件
这是由于使用not(在jdk6中)现有的Repeatable类引起的,我很高兴它只是一个警告.我喜欢gradle的干净输出,这只是令人讨厌,因为它可能会混淆其他"真正的"警告(如checkstyle ......).
也许任何人都遇到了同样的问题,并为这种情况得到了一个(不是那么多黑客)解决方案.我只想再次看到干净的输出.
我试图找到一种方法来检查密码模式索引中是否存在某个索引。我可以通过使用找到所有索引call db.indexes()。但是如何检查特定索引?
我希望我对JSF的理解是正确的,这一切都是有道理的。我尝试通过使用(条件)包含在页面内进行某种简单的模板化。通过选择来更新面板。
<p:outputPanel id="panel">
<h:panelGroup rendered="#{not empty someBean.selectedObject}">
<ui:include src="WEB-INF/pages/#{someBean.selectedObject.pageName}.xhtml" />
</h:panelGroup>
</p:outputPanel>
Run Code Online (Sandbox Code Playgroud)
如果我是对的,那么ui:include将在某种形式的视图准备阶段处理该rendered属性,并在页面呈现之前处理该属性。结果,我得到一个FileNotFoundException,因为它试图加载WEB-INF / pages / .xhtml。这对我来说很有意义,但是如何解决此问题而又不会出现混乱的变通办法,例如创建一个空页面作为文件名(page.xhtml)的前缀,并为应该使用此字符串实际呈现的每个页面添加前缀(pageSamplePage.xhtml) )?
我很难找到为什么我在这段代码上返回nullpointer:
import java.awt.Graphics2D;
import java.awt.Rectangle;
public class Move {
private static final int DIAMETER = 30;
int x = 0;
int y = 0;
int x_1 = 1;
int y_1 = 1;
private GameStart game;
public void Ball(GameStart game) {
this.game = game;
}
void moveBall() {
if (x + x_1 < 0) {
x_1 = 1;
}
if (x + x_1 > game.getWidth() - DIAMETER) {
x_1 = -1;
}
if (y + y_1 < 0) {
y_1 = …Run Code Online (Sandbox Code Playgroud)