草庐IT

Forth_Parameter

全部标签

java - Log4j2 的 FailoverAppender 错误 : appender Failover has no parameter that matches element Failovers

当我使用log4j2.1编译我的spring3.2.9web应用程序时,这个错误出现在控制台中:2015-02-0212:08:25,213ERRORappenderFailoverhasnoparameterthatmatcheselementFailovers我的理解是元素“Failover”中不存在元素“Failover”,对吗?为什么会这样?我看不出有什么问题,因为我有sameconfigurationasthelog4j2manual.我的log4j2.xml中有这个配置:[%d{ISO8601}]%c[%C{1}]-%p:%m%n[%d{ISO8601}][%c]-%p:%

java - hibernate 查询 : positioned parameter and named parameter

HibernateQuery中有两种类型的查询参数绑定(bind)。一种是定位参数,另一种是命名参数。我可以在一个查询中使用这两个参数吗? 最佳答案 当然可以,只要您确保所有位置参数都在任何命名参数之前。这是一个例子:Queryq=session.createQuery("selectufromUseruwhereu.location=?andu.idin(:user_ids)");q.setParameter(0,location);q.setParameterList("user_ids",userIds);returnq.li

java - "error_description": "AADSTS70002: The request body must contain the following parameter: ' client_secret or client_assertion'

我使用了https://github.com/AzureAD/azure-activedirectory-library-for-java/blob/master/src/samples/public-client-app-sample/src/main/java/PublicClient.java中的代码.唯一的区别是CLIENT_ID已更新。我一直收到错误消息"error_description":"AADSTS70002:Therequestbodymustcontainthefollowingparameter:'client_secretorclient_assertion'

java - Spring 安全 : Ignore login page by using a special URL parameter

我目前有一个看起来像这样的设置:spring-security.xml:web.xml:springSecurityFilterChainorg.springframework.web.filter.DelegatingFilterProxyspringSecurityFilterChain/*这一切似乎都按预期工作,但是,在特殊情况下,如果用户传入特殊token,我希望绕过登录页面。因此,目前,如果用户转到诸如/dog之类的url,他们将看到登录页面,如果他们传入foo/bar的凭据,那么他们将登录后看到/dog对应的页面。我希望能够使用诸如/dog?token=abcd这样的URL

java - Spring : Multipart form data request : Read dynamic parameter from request

我正在使用Spring框架并能够成功将文件上传到服务器上。................//Controller层@RequestMapping(value="/upload.do",method={RequestMethod.POST})publicStringaddEditLocationToCompany(Modelmodel,@RequestParam("description")Stringdesc,@RequestParam(value="locationMapFile",required=false)CommonsMultipartFilelocationMapFile

java.lang.IllegalArgumentException : Unknown parameter name : customer 异常

我正在尝试使用getNamedQuery方法创建一个列表,但我遇到了这个异常。这是我的代码publicListgetEquipsByCustomer(intcustomer){return(List)sessionFactory.getCurrentSession().getNamedQuery("getEquipsByCustomer").setParameter("customer",customer).list();}以及xml文件中的查询SELECTe.*FROMrequestrINNERJOINequipeONr.equip_id=e.equip_idINNERJOINcus

java - Missing IN or OUT parameter at index::1 java, Oracle 中的错误

您好,我使用Netbeans8.0.2和Oracle11gExpressEdition在JSF2.2中编写了一个图书馆管理系统。我有几个名为Books、Borrowers等的页面和一些在数据库中命名为相同的表。我的问题是:在Borrowers屏幕中显示了图书ID。但我想获得具有相同ID的书名。这是我的代码。publicListgetBorrowers()throwsClassNotFoundException,SQLException,InstantiationException,IllegalAccessException{Class.forName("oracle.jdbc.dri

java - 漏洞 : parameter 'initialCapacity' of ConcurrentHashMap's construct method?

java.util.concurrent.ConcurrentHashMap的构造方法之一:publicConcurrentHashMap(intinitialCapacity){if(initialCapacity=(MAXIMUM_CAPACITY>>>1))?MAXIMUM_CAPACITY:tableSizeFor(initialCapacity+(initialCapacity>>>1)+1));this.sizeCtl=cap;}方法“tableSizeFor(...)”的参数是什么意思?initialCapacity+(initialCapacity>>>1)+1我认为参

java - 方法重载 : Single parameter vs alternating parameters

这个问题可能类似于Javaoverloadconfusion我正在阅读一本书,其中有一个关于方法重载的主题,编译器可能无法从中解析被调用的方法。书中的例子使用了带有两个参数(int,double)和(double,int)的重载方法。调用此方法如overloadedTwoParam(4,5)将导致编译器错误,因为int可以传递给double。我的问题是,如果我的参数只有一个,为什么编译器能够解析将调用哪个方法?publicclassTest{publicstaticvoidmain(String[]args){Testt=newTest();t.overloadedSinglePara

java - org.springframework.dao.InvalidDataAccessApiUsageException : No value supplied for the SQL parameter

我正在使用BeanPropertySqlParameterSource和SqlParameterSource开发SpringJDBC示例。当我运行我的代码时,我看到出现以下错误。花了几个小时后,我没有找到它的解决方案。有什么问题请指点。org.springframework.dao.InvalidDataAccessApiUsageException:NovaluesuppliedfortheSQLparameter'employeeId':Invalidproperty'employeeId'ofbeanclass[com.spring.jdbc.model.Order]:Beanp