oracle 11g and integration of hibernate spring and jsf

后端 未结 1 1435
鱼传尺愫
鱼传尺愫 2020-12-22 08:13

i am using jsf 2,hibernate 4.1.4,spring 3.1,oracle 11g and maven 3. but it can not connect to oracle and has error. i downloaded the latest version ojdbc6. applicationContex

相关标签:
1条回答
  • 2020-12-22 08:41

    i import org.springframework.transaction.annotation.Transactional in my CustomerBoImpl.java

    import java.util.List;
    import bo.ICustomerBo;
    import dao.ICustomerDao;
    import model.Customer;
    import org.springframework.transaction.annotation.Transactional;
    
    @Transactional(readOnly = true)
    public class CustomerBoImpl implements ICustomerBo{
    
        ICustomerDao customerDaoImpl;
    
    
    
        public ICustomerDao getCustomerDaoImpl() {
            return customerDaoImpl;
        }
    
        public void setCustomerDaoImpl(ICustomerDao customerDaoImpl) {
            this.customerDaoImpl = customerDaoImpl;
        }
    
    @Transactional(readOnly = false)
    @Override
        public void addCustomer(Customer customer){
    
            getCustomerDaoImpl().addCustomer(customer);
    
        }
    
    @Transactional(readOnly = false)
    @Override
        public void updateCustomer(Customer customer){
            getCustomerDaoImpl().updateCustomer(customer);
        }
    
    @Transactional(readOnly = false)
    @Override
        public void deleteCustomer(Customer customer){
            getCustomerDaoImpl().deleteCustomer(customer);
        }
    
    @Override
        public List<Customer> findAllCustomer(){
    
            return getCustomerDaoImpl().findAllCustomer();
        }
    }
    
    0 讨论(0)
提交回复
热议问题