File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
src/main/java/de/dominikschadow/webappsecurity/controller Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 2828 <artifactId >jstl</artifactId >
2929 <version >1.2</version >
3030 </dependency >
31+ <dependency >
32+ <groupId >org.slf4j</groupId >
33+ <artifactId >slf4j-api</artifactId >
34+ </dependency >
35+ <dependency >
36+ <groupId >org.slf4j</groupId >
37+ <artifactId >slf4j-log4j12</artifactId >
38+ </dependency >
3139 <dependency >
3240 <groupId >log4j</groupId >
3341 <artifactId >log4j</artifactId >
Original file line number Diff line number Diff line change 1919package de .dominikschadow .webappsecurity .controller ;
2020
2121import de .dominikschadow .webappsecurity .domain .Contact ;
22- import org .apache .log4j .Logger ;
22+ import org .slf4j .Logger ;
23+ import org .slf4j .LoggerFactory ;
2324import org .springframework .stereotype .Controller ;
2425import org .springframework .validation .BindingResult ;
2526import org .springframework .web .bind .annotation .ModelAttribute ;
3536@ Controller
3637@ SessionAttributes
3738public class ContactController {
38- private static final Logger LOGGER = Logger .getLogger (ContactController . class );
39+ private Logger logger = LoggerFactory .getLogger (getClass () );
3940
4041 @ RequestMapping (value = "/addContact" , method = RequestMethod .POST )
4142 public ModelAndView addContact (@ ModelAttribute ("contact" ) Contact contact , BindingResult result ) {
42- LOGGER .info ("Firstname: " + contact .getFirstname () + ", Lastname: " + contact .getLastname ());
43+ logger .info ("Firstname: " + contact .getFirstname () + ", Lastname: " + contact .getLastname ());
4344
4445 return new ModelAndView ("contact" , "command" , contact );
4546 }
You can’t perform that action at this time.
0 commit comments