**New to Spring and JPA**

I have a following controller class 

```
public class RegisterStudent{
    private StudentInfo studentInfo;
    private RegisterStudentHelper studentHelper;

    public  void registerStudentProcess(String name,String regNo,String course)
    {
       // // Creating an Instance of StudentInfo Class
        studentInfo = new StudentInfo();
        studentInfo.setName(name);
        studentInfo.setRegNo(regNo);
        studentInfo.setCourse(course);

        // set the StudentInfo to the RegisterStudentHelper constructor
        studentHelper = new RegisterStudentHelper(studentInfo);
        studentHelper.doRegisterStudentProcess();
    }   
}

```

I am trying to convert the same model while using Spring , JPA & hibernate which will look like this

```
    @Controller
    public class RegisterStudent{
            @Autowired
            private StudentInfo studentInfo;
            @Autowired
            private RegisterStudentHelper studentHelper;

            public  void registerStudentProcess(String name,String regNo,String course)
        {

            studentInfo.setName(name);
            studentInfo.setRegNo(regNo);
            studentInfo.setCourse(course);

            studentHelper = new RegisterStudentHelper(studentInfo);
            studentHelper.doRegisterStudentProcess();
    }
}

```

How can i use Annotations to set studentInfo to registerStudentHelper constructor ?

Any ideas or suggestions are appreciated .