Spring and Hibernate configuration
As I am new to all this JEE ocean, there is so much I want to know, and as I read more and more info on the internet I get more confused than anything gets clear. Are my presumptions right:

 

 1. Firstly we need `Entity` class (POJO) with `@Entity`, `@Table`, `@Column` and etc. annotations.
 2. Secondly we make `Service` class which will make physical changes in single database's table using `SessionFactory` witch will be `@Autowired`. If I'm correct is this so called DAO? And do this class need to implement any other class? Because I saw numerous examples where connection between controller and entity is like 3 classes long (one of which is interface). And there are some implementations in those classes.
 3. The last thing we need is controller which will have `Service` class object which will also be `@Autowired`.

So to summarize: we have `@Controller` class which uses `@Autowired` service class object. Service class object consists of save/delete/select methods that are executed through `@Autowired` SessionFactory object?

If I'm right what configurations are needed for all this scheme to work? And if I'm wrong please explain how this must be done with as little configuration in XML files as possible.

Thank you.
Spring and Hibernate configuration
===

As I am new to all this JEE ocean, there is so much I want to know, and as I read more and more info on the internet I get more confused than anything gets clear. Are my presumptions right:

 

 1. Firstly we need `Entity` class (POJO) with `@Entity`, `@Table`, `@Column` and etc. annotations.
 2. Secondly we make `Service` class which will make physical changes in single database's table using `SessionFactory` witch will be `@Autowired`. If I'm correct is this so called DAO? And do this class need to implement any other class? Because I saw numerous examples where connection between controller and entity is like 3 classes long (one of which is interface). And there are some implementations in those classes.
 3. The last thing we need is controller which will have `Service` class object which will also be `@Autowired`.

So to summarize: we have `@Controller` class which uses `@Autowired` service class object. Service class object consists of save/delete/select methods that are executed through `@Autowired` SessionFactory object?

If I'm right what configurations are needed for all this scheme to work? And if I'm wrong please explain how this must be done with as little configuration in XML files as possible.

Thank you.