草庐IT

filter-name

全部标签

java - 开源 XPath Filter 2.0 实现

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。关闭7年前。Improvethisquestion有谁知道XPathFilter2.0的开源实现吗?,最好用Java?但任何其他语言也可以。该标准不是那么新,所以应该存在一些东西,但我找不到任何东西......如果真的没有什么是足够的,有没有人实现过它并且可以告诉我用标准方法(DOM模型加XPath)实现它有多困难?只是粗略估计,两个全职工作的人需要几天还是几周的时间?

java - 命名 Hibernate 查询的 "Named query not known"?

可能是什么问题?@Entity@NamedQueries({@NamedQuery(name=User.ALL,query="SELECTuFROMUseru")})publicclassUser{publicstaticfinalStringALL="User.all";}publicclassService{find...with...User.ALL}堆栈跟踪:Causedby:org.hibernate.MappingException:Namedquerynotknown:User.allatorg.hibernate.impl.AbstractSessionImpl.get

java - Files.walk.filter 和 Files.find 有什么区别?

此代码搜索特定文件:StreamfindMyFile=Files.find(Paths.get("c:\\temp\\pathtest"),Integer.MAX_VALUE,(p,a)->p.endsWith("test.txt")&&a.isRegularFile());StreamfindMyFileSecond=Files.walk(Paths.get("c:\\temp\\pathtest"),Integer.MAX_VALUE).filter(p->p.endsWith("test.txt"));findMyFile.forEach(System.out::println)

java - maven-javadoc-插件错误javadoc : error - cannot read Input length = 1 with non-ASCII characters in directory name

我在Windows10上使用OpenJDK11。我有一个非常简单的POM,用于生成Javadoc的单个Java文件。这是一个摘录:UTF-81111org.apache.maven.pluginsmaven-javadoc-plugin3.0.1jar奇怪的是,运行mvncleanpackage会导致错误:[ERROR]Failedtoexecutegoalorg.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar(default)onprojectfoobar:MavenReportException:Errorwhilegener

java - Tomcat的 "URIEncoding"、Encoding Filter和request.setCharacterEncoding有什么区别

解决编码问题的方法可能有很多:像SpringMVCUTF-8Encoding这样的编码过滤器在Tomcat的server.xml中设置URIEncoding=UTF-8,如http://struts.apache.org/release/2.1.x/docs/how-to-support-utf-8-uriencoding-with-tomcat.html.request.setCharacterEncoding(utf-8)今天,我有一个问题,路径参数没有像这样解码好@ResponseBody@RequestMapping(value="/context/method/{key}",

java - Spring 安全抛出 javax.servlet.ServletException : Could not resolve view with name 'j_spring_security_check'

我正在尝试将具有自定义登录页面和数据库访问的Springsecurity添加到我的SpringMVC应用程序中。似乎我的映射是错误的,因为它无法映射j_spring_security_check。为了解决这个问题,我查看了以下页面1、2、3但仍无法解决问题。如果您没有太多时间,请阅读下面的第2部分,这是问题的编辑部分开始的地方。否则,请阅读第1部分和第2部分。第1部分我还在我的web.xml文件中添加了以下行,但应用程序返回以下异常。springSecurityFilterChainorg.springframework.web.filter.DelegatingFilterProxy

java - 是否有 Checkstyle/PMD 规则 "Non-abstract classes should not be named AbstractXXX"?

我正在处理的Java项目结合使用了代码分析工具:PMD、Checkstyle和FindBugs。这些发现了大量错误、样式问题等,但经常有一个漏网之鱼:publicclassAbstractBadlyNamedClass{//Notabstract!//...}注意相反的方式被检查,即publicabstractBadlyNamedClass给出PMD警告“抽象类应命名为AbstractXXX”。任何人都可以建议是否有一种方法可以检查这一点,可以使用上述工具之一(可能是某种自定义规则?)或其他可以完成这项工作的自动化工具? 最佳答案

java - Camel cxf :cxfEndpoint Producer error : Can't find the BindingOperationInfo with operation name

我正在使用camelcxf:cxfEndpoint调用soap服务,但收到此BindingOperationInfo错误。配置对我来说看起来是正确的,但不确定我哪里做错了。端点配置:我的JavaDSL路由器配置。from("direct:invokeMyUpdate").bean("myAcctSvcClient","buildSoapReq").setHeader(CxfConstants.OPERATION_NAME,constant("getAccountInfo")).to("cxf:bean:accountEndpoint")WSDL元素:错误如下:Stacktrace:ja

javax.net.ssl.SSLException : Certificate for <> doesn't match any of the subject alternative names: [] 异常

当我尝试使用Postman访问URL时,它工作正常,通过使用我的个人证书。但是当我使用RestAssured测试用例尝试相同时,它抛出上述异常。配置类publicclassConfiguration{protectedSSLConfigconfig=null;privatestaticfinalLoggerLOG=LoggerFactory.getLogger(Configuration.class);@SuppressWarnings("deprecation")@BeforeClasspublicvoidsetKeystore(){KeyStorekeyStore=null;Key

Java "Jackson"JsonMappingException : Can not deserialize instance of float out of FIELD_NAME token

与这个类:publicclassProductsimplementsSerializable{privateBigDecimalproductId;privatefloatpriority;publicfloatgetPriority(){returnpriority;}publicvoidsetPriority(floatpriority){this.priority=priority;}}在对此类JSON数据进行反序列化时:{"productId":47552,"priority":78}出现这个错误:org.codehaus.jackson.map.JsonMappingExce