Transactions belong to Service layer. For example if you have HotelService
, then the code would look like this:
@Service("hotelService")
@Transactional
public class HotelServiceImpl implements HotelService {
@Autowired
HotelDao hotelDao;
// The rest of code omited ...
}