spring

using only annotated mappings

Hello, I'm having some problems removing mappings from my dispatcher-servlet.xml file. I've annotated some controllers with @RequestMapping, am using spring 3.0.3, and have all the correct includes. Shouldn't this work? ...

spring 3 my converter is not used...

...but registered Using Spring 3 I have two converters registered as follows: <beans:bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean"> <beans:property name="converters"> <beans:list> <beans:bean class="mypackage.CalendarToStringConverter" /> <beans:bean class="my...

Dependency injection, Scala and Spring

I love the concept of DI and loosely coupled system, a lot. However, I found tooling in Spring lacking at best. For example, it's hard to do "refactoring", e.g. to change a name of a bean declared in Spring. I'm new to Spring, so I would be missing something. There is no compiling time check etc. My question is why do we want to use XM...

is spring security worth the effort

i've been looking over spring security and noticing how its a pretty big package. I'm wondering if it's worth the effort to take the time to ramp up on this. has spring security 2.0+ saved you a large amount of time, or has it simplified your project in any way? ...

Spring 3.x and Hibernate Envers

I'm having a problem getting Hibernate Envers to work in our environment. We are using Spring 3.x with LoadTimeWeaving. Below is our context file: <context:annotation-config/> <context:spring-configured/> <context:load-time-weaver aspectj-weaving="autodetect"/> <context:component-scan base-package="com.viridityenergy.vpower"/> <context:...

BeanCreationException NoSuchBeanDefinitionException while starting Google App Server for below Spring code

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [clinic.ict.service.TestService] found for dependency: expected at least 1 bean w...

Flex 4 & Spring 3 Integration (BlazeDS) (Refcardz): @Secured not working

Hi, Please be gentle on the quasiNoob(expert w/Flex & Actionscript, != expert w/Spring) ! I am on Mac Snow Leopard and using STS 2.3.2 Release w/the Flash Builder 4 plugin and tomcat 6. Everything works except for the security exclusion using the Spring @Secured annotation in the java class: When I am not logged in, I can enter messag...

how to use JSF in JSP- and XHTML-Files

My Webapplication has in fact two different View-Files: JSP-Files including JSF XHTML-Files including JSF In Version 2.0 of JSF you can use both, but I should use both with Spring and Spring Web Flow! So how can I define, that both View-Files are possible and work with Spring and Spring Web Flow? ...

Populating a spring bean using a constructor-arg field

How can i inject a properties file containing a Map to be used as additional constructor arg using the field. With a Map being loaded from a properties file the bean is currently setup using: <bean id="graphDbService" class="org.neo4j.kernel.EmbeddedGraphDatabase" init-method="enableRemoteShell" destroy-method="shutdown"> ...

getting org.springframework.web.bind.MissingServletRequestParameterException

Hi all, I am using spring annotations I have written one method public ModelAndView showTestPage(@RequestParam("firstInstanceId") String id1, @RequestParam("secondInstanceId") String id2, HttpSession session) { ModelAndView mv = new ModelAndView("showCompareItemList"); mv.addObject("pageTitle", "showCompareItemList"); mv.addO...

How to set up Spring Security SecurityContextHolder strategy?

Hi, I'm using asynchronous methods in my service (Spring 3 @Async annotation). And I've got a problem - spawned thread doesn't have security context. Cause of it is Spring Security by default uses SecurityContextHolder.MODE_THREADLOCAL strategy for its context holder. But I need to use SecurityContextHolder.MODE_INHERITABLETHREADLOCAL s...

Hibernate annotation configuration with Spring can't find domain object

I am having a problem with Hibernate seeing my domain objects doing a purely annotation configuration for Hibernate. I'm getting org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [from User u where u.userName=:userName] I thought all that had to be done was add the packagesToScan property for the sessionFactory and add @E...

Something in Spring like 'init-method' but called after dependencies are injected?

This is crazy... been using Spring for a while but can't find something like the "init-method" that gets invoked AFTER all the dependencies have been injected. I saw the BeanPostProcessor thingie but I am looking for something lightweight and non-intrusive that doesn't couple my beans to Spring. Like the init-method! ...

eCommerce frameworks implemented over Spring

Hi We are evaluating ecommerce frameworks that are implemented using Spring. I found three frameworks FastSpring, ElasticPath and Broadleaf which use Spring. Are there any other frameworks? How do these frameworks compare in completeness of feature support for promotion, campaign management and personalization. regards Alen ...

Hibernate cannot open connection

Hi all, I'm having trouble with hibernate not able to open a connection. I have a DAO: public class MyDao extends HibernateDaoSupport { DataSource dataSource; public void setDataSource(DataSource dataSource) { this.dataSource = dataSource; } public MyPOJO findByQuery(int hour) { Query query = th...

bind Spring HandlerInterceptor only to one controller

Using Spring 3.0.2.RELEASE. I'm having 2 Controllers in package com.myCompany. The Controllers are activated via Component-scan <context:component-scan base-package="com.myCompany" /> then I'm having a interceptor bind to the 2 controllers via <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMappi...

how to reattach singleton Spring beans upon deserialization

I want to reinject singleton-scoped dependencies into prototype Spring beans, after they have been deserialized. Say I've got a Process bean, which depends on a Repository bean. The Repository bean is a scoped as a singleton, but the Process bean is prototype-scoped. Periodically I serialize the Process, and then later deserialize i...

Where can I get the petclinic sample app for Spring 3.0 ?

Docs,forums etc. keeps referencing the Spring petclinic example. Where can I get this for spring 3.0.x ? (it seems not to be bundled with spring-framework-3.0.3.RELEASE-with-docs.zip) ...

Is Spring's Lifecycle.stop() supposed to synchronous or asynchronous?

It's not clear from the Spring documentation reference or JavaDoc if Lifecycle.stop() is supposed to execute synchronously or asynchronously. Does anyone know? ...

JUnit TestCase Failure

I'am running my JunitTest and it gives the following error.. not failure. Error creating bean with name 'reportDAO' defined in class path resource [LT.xml]: Cannot resolve reference to bean 'hibernateTemplate' while setting bean property 'hibernateTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException...