Skip to content

Commit 1e60c8f

Browse files
authored
Merge pull request eugenp#5324 from amit2103/BAEL-9021
[BAEL-9021] - Fixed compilation error and uncommented module in paren…
2 parents bf912b1 + df7794c commit 1e60c8f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@
643643
<module>spring-mobile</module>
644644
<!-- <module>spring-mustache</module> --><!-- PMD voilation -->
645645
<module>spring-mvc-simple</module>
646-
<!-- <module>spring-mybatis</module> --><!-- Compilation failure -->
646+
<module>spring-mybatis</module>
647647
<module>spring-rest-hal-browser</module>
648648
<module>spring-rest-shell</module>
649649
<module>spring-rest-template</module>
@@ -960,7 +960,7 @@
960960
<module>spring-mobile</module>
961961
<!-- <module>spring-mustache</module> --><!-- PMD voilation -->
962962
<module>spring-mvc-simple</module>
963-
<!-- <module>spring-mybatis</module> --><!-- Compilation failure -->
963+
<module>spring-mybatis</module>
964964
<module>spring-rest-hal-browser</module>
965965
<module>spring-rest-shell</module>
966966
<module>spring-rest-template</module>

spring-mybatis/src/main/java/com/baeldung/spring/mybatis/controller/StudentController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public String signup(Model model) {
3131

3232
@RequestMapping(value = "/signup", method = RequestMethod.POST)
3333
public String signup(@Validated @ModelAttribute("student") Student student, BindingResult result, ModelMap model) {
34-
if (studentService.getStudentByUserName(student.getUserName())) {
34+
if (studentService.getStudentByUserName(student.getUserName()) != null) {
3535
model.addAttribute("message", "User Name exists. Try another user name");
3636
return "signup";
3737
} else {
@@ -50,7 +50,7 @@ public String login(Model model) {
5050

5151
@RequestMapping(value = "/login", method = RequestMethod.POST)
5252
public String login(@ModelAttribute("studentLogin") StudentLogin studentLogin, BindingResult result, ModelMap model) {
53-
boolean found = studentService.getStudentByLogin(studentLogin.getUserName(), studentLogin.getPassword());
53+
boolean found = studentService.getStudentByLogin(studentLogin.getUserName(), studentLogin.getPassword()) != null;
5454
if (found) {
5555
return "success";
5656
} else {

0 commit comments

Comments
 (0)