on-internet
← Community

How to insert data into the database using spring + hibernate?

Stack Overflow ·

see i m havving user.java for the user info. @Entity(name = "user") @Table(name = "user") public class User { @Id @Column(name = "id") private String id; @Column(name = "password") private String password; //getter and setter for this.. } this is my userdao public class UserDao { public interface UserDAO { public String insert(User user); } } and this is the impl class for inserting into database see this was my code.please check it and tell me what i m doing wrong @Repository @Transactional public class UserImpl implements UserDAO { private DataSource dataSource; @Autowired SessionFactory ses

Comments

Sign in or sign up to comment and upvote.

No comments yet.