Skip to content
Advertisement

Tag: spring-mvc

Could not autowire field in spring. why?

I keep getting this error, and can’t figure out why.. yes I know there many people had similar issues, but reading the answers they got, does not solve my problem. org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘contactController’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private net.service.ContactService net.controller.ContactController.contactService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean

How to use for checking multiple Roles?

I want to display some content conditionally based on Roles using Spring Security JSP taglibs. But in Spring Security 3.1.x is checking for only one role. I can use but ifAllGranted is deprecated. Any help? Answer There is a special security expression in spring security: hasAnyRole(list of roles) – true if the user has been granted any of the roles

HQL ERROR: Path expected for join

I keep trying variations of this query and can’t seem to make this happen. I’ve also referenced this post: Path Expected for Join! Nhibernate Error and can’t seem to apply the same logic to my query. My User object has a UserGroup collection. I understand that the query needs to reference entities within the object, but from what I’m seeing

Spring value injection in mockito

I’m trying to write test class for the following method I’m using the injected url value in one of the methods in the class. To test this i’ve written a junit class In applicationContext-test.xml I’m loading the property file using But the url value is not getting loaded in the CustomService on running the test. I was wondering if there

Stored Procedure returning multiple tables to spring jdbc template

Iam calling a stored procedure from my Spring DAO class using JdbcTemplate. My problem is that, stored procedure returns multiple tables. Is there a way to access multiple tables using Spring JdbcTemplate. If I use jdbcTemplate.queryForList(myStoredProc, new Object[]{parameters} iam getting only first table from the result. My database is SQL Server 2005. Is there any method other than jdbcTemplate for

Alternatives to JSP for Spring MVC view layer [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed last year. The community reviewed whether to reopen this question last year and left it closed: Original

Advertisement