由于我使用Maven,因此我能够在我的本地存储库项目中构建和安装具有不完整Javadoc标记的项目(例如,缺少参数).
但是,由于我迁移到Java 8(1.8.0-ea-b90),当我尝试构建或安装Javadoc不是Javadoc的项目时,Maven绝对严格缺少文档标记,并向我展示了许多与Javadoc问题相关的Javadoc错误"完善".我试图在我的本地存储库中编译和安装的一些项目是我无法控制的第三方项目.因此,在我的场景中,仅修复所有这些项目中的所有Javadoc的解决方法似乎并不可行.
这是我mvn clean package install
在项目中执行时看到的输出的一小部分:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.026s
[INFO] Finished at: Mon Apr 08 21:06:17 CEST 2013
[INFO] Final Memory: 27M/437M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9:jar (attach-javadocs) on project jpc: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - /Users/sergioc/Documents/workspaces/heal/jpc/src/main/java/org/jpc/engine/prolog/PrologDatabase.java:10: error: @param name not found
[ERROR] * @param terms the terms to assert
[ERROR] ^
[ERROR] /Users/sergioc/Documents/workspaces/heal/jpc/src/main/java/org/jpc/engine/prolog/PrologDatabase.java:11: warning: no description for @return
[ERROR] * …
Run Code Online (Sandbox Code Playgroud) 我有一个使用Spring Security的Spring MVC Web应用程序.我想知道当前登录用户的用户名.我正在使用下面给出的代码段.这是接受的方式吗?
我不喜欢在这个控制器中调用静态方法 - 这违背了Spring的全部目的,恕我直言.有没有办法配置应用程序以注入当前的SecurityContext或当前的身份验证?
@RequestMapping(method = RequestMethod.GET)
public ModelAndView showResults(final HttpServletRequest request...) {
final String currentUser = SecurityContextHolder.getContext().getAuthentication().getName();
...
}
Run Code Online (Sandbox Code Playgroud) 我该怎么做XPath:
//bookstore/book/title or //bookstore/city/zipcode/title
Run Code Online (Sandbox Code Playgroud)
只是//title
不行,因为我也有//bookstore/magazine/title
ps我看了很多或者例子,但主要是属性或单节点结构.
我有一个insertOrUpdate
方法,它插入一个Entity
不存在的方法或更新它,如果它.要启用它,我必须findByIdAndForeignKey
,如果它返回null
插入,如果没有然后更新.问题是如何检查它是否存在?所以我试过了getSingleResult
.但是如果它会引发异常
public Profile findByUserNameAndPropertyName(String userName, String propertyName) {
String namedQuery = Profile.class.getSimpleName() + ".findByUserNameAndPropertyName";
Query query = entityManager.createNamedQuery(namedQuery);
query.setParameter("name", userName);
query.setParameter("propName", propertyName);
Object result = query.getSingleResult();
if (result == null) return null;
return (Profile) result;
}
Run Code Online (Sandbox Code Playgroud)
但getSingleResult
扔了一个Exception
.
谢谢
当我试图推动掌握时,我得到:
remote:commit_refs中的致命错误
我怎么解决这个问题?
我在C#中有一个使用a的表单ComboBox
.如何防止用户ComboBox
在C#中手动输入文本?
this.comboBoxType.Font = new System.Drawing.Font("Arial", 15.75F);
this.comboBoxType.FormattingEnabled = true;
this.comboBoxType.Items.AddRange(new object[] {
"a",
"b",
"c"});
this.comboBoxType.Location = new System.Drawing.Point(742, 364);
this.comboBoxType.Name = "comboBoxType";
this.comboBoxType.Size = new System.Drawing.Size(89, 32);
this.comboBoxType.TabIndex = 57;
Run Code Online (Sandbox Code Playgroud)
我希望ABC成为唯一的选择.
我需要System.exit(0)
在应用程序中使用.Eclipse安装了PMD插件并抱怨这行代码.添加@SuppressWarnings ("PMD.DoNotCallSystemExit")
删除该警告,但现在我得到一个警告,这SuppressWarnings
是不受支持的,尽管它的工作原理.
有办法解决这个问题吗?
我遇到了JDBC问题.
我有以下代码:
//blargeparam is a blob column.
PreparedStatement pst =connection.prepareStatement("update gcp_processparams_log set blargeparam= ? where idprocessparamslog=1");
pst.setBinaryStream(1,inputStream);
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Exception in thread "main" java.lang.AbstractMethodError:
oracle.jdbc.driver.T2CPreparedStatement.setBinaryStream(ILjava/io/InputStream;)V
Run Code Online (Sandbox Code Playgroud)
我的连接字符串是 jdbc:oracle:oci:@.....
Oracle版本为11g.
从错误消息似乎缺少某些东西但是:
这是我的类路径中Oracle JDBC JAR的清单:
Manifest-Version: 1.0
Specification-Title: Oracle JDBC driver classes for use with JDK14
Sealed: true
Created-By: 1.4.2_14 (Sun Microsystems Inc.)
Implementation-Title: ojdbc14.jar
Specification-Vendor: Oracle Corporation
Specification-Version: Oracle JDBC Driver version - "10.2.0.4.0"
Implementation-Version: Oracle JDBC Driver version - "10.2.0.4.0"
Implementation-Vendor: Oracle Corporation
Implementation-Time: Sat Feb 2 11:40:29 2008
Run Code Online (Sandbox Code Playgroud)我想用测试来调试Eclipse构建.我试图通过Run> Debug Configurations> Maven Build来运行它.在Base目录中是我的Maven repo目录和pom.xml文件,目标'clean install'.当我点击调试Eclipse启动构建时,运行测试但它不会在断点上停止.
我正在开发一个Java遗留项目,它有20个模块相互连接.因此,每个模块都有自己的分支和标记.结构是这样的:
/projects
.svn
- module1
.svn
-trunk
-branch
-tag
- module2
.svn
-trunk
-branch
-tag
projects文件夹大约30 GB,几乎不可能用于git-svn clone
签出所有模块,但这是因为它计算所有分支和标签.
是否可以只克隆项目中继,以便我可以开始在本地提交?