Hi,
I have a REST-service exposed through Spring-MVC. I have a particular method which is correctly mapped and called through a HTTP-call. My Spring application contains the HibernateTransactionManager
and transactions are configured through @Transactional
-annotations. I annotated the method like this:
@Transactional(readOnly = true)
@Override
@RequestMapping(value = "/start", method = RequestMethod.GET)
@ResponseBody
public List<SomeObject> start(....)
Whenever I call the HTTP-method I a org.hibernate.LazyInitializationException
from my org.springframework.http.converter.json.MappingJacksonHttpMessageConverter
which is bound in my application context. Is the @Transactional
annotation valid for the MessageConverter
as well?