Thank you for this example. Even though there are few major problems with using your example in real-life projects, I'm still sticking with it. My question is how could I include repository into other classes beside controller? For example forms (LoginForm)?
final Form form = Form.form(LoginForm.class).bindFromRequest();
public class LoginForm
{
@Required
@Email
public String email;
@Required
public String password;
public String next;
Hi
Thank you for this example. Even though there are few major problems with using your example in real-life projects, I'm still sticking with it. My question is how could I include repository into other classes beside controller? For example forms (LoginForm)?
public class LoginForm { @Required @Email public String email;
@Required public String password; public String next;
@Autowired private PersonRepository personRepository;
...
personRepository is always null...any ideas?