Skip to content

Commit df7794c

Browse files
committed
[BAEL-9021] - Fixed compilation error and uncommented module in parent pom.xml
1 parent a141043 commit df7794c

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
@@ -642,7 +642,7 @@
642642
<module>spring-mobile</module>
643643
<!-- <module>spring-mustache</module> --><!-- PMD voilation -->
644644
<module>spring-mvc-simple</module>
645-
<!-- <module>spring-mybatis</module> --><!-- Compilation failure -->
645+
<module>spring-mybatis</module>
646646
<module>spring-rest-hal-browser</module>
647647
<module>spring-rest-shell</module>
648648
<module>spring-rest-template</module>
@@ -959,7 +959,7 @@
959959
<module>spring-mobile</module>
960960
<!-- <module>spring-mustache</module> --><!-- PMD voilation -->
961961
<module>spring-mvc-simple</module>
962-
<!-- <module>spring-mybatis</module> --><!-- Compilation failure -->
962+
<module>spring-mybatis</module>
963963
<module>spring-rest-hal-browser</module>
964964
<module>spring-rest-shell</module>
965965
<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)