In your SpringBean.xml you should uncomment <tx:annotation-driven/>
:
<tx:annotation-driven transaction-manager="transactionManager"/>
And then you should annotate the CustomerServiceImpl.saveCustomer
method
as @Transactional
:
@Service
public class CustomerServiceImpl implements CustomerService {
...
@Override
@Transactional
public void saveCustomer(Customer customer) {
customerDaoImpl.saveCustomer(customer);
}
...
}