Skip to content

Commit

Permalink
updated logger to slf4j
Browse files Browse the repository at this point in the history
  • Loading branch information
dschadow committed Dec 14, 2024
1 parent b68a327 commit f5ac3e1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
package de.dominikschadow.javasecurity.contacts;

import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
Expand All @@ -36,8 +35,8 @@
@Controller
@RequestMapping(value = "/contacts")
@RequiredArgsConstructor
@Slf4j
public class ContactController {
private static final Logger log = LoggerFactory.getLogger(ContactController.class);
private final ContactService contactService;

@GetMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
package de.dominikschadow.javasecurity.downloads;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.owasp.esapi.errors.AccessControlException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.Resource;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
Expand All @@ -42,8 +41,8 @@
@Controller
@RequestMapping
@RequiredArgsConstructor
@Slf4j
public class DownloadController {
private static final Logger log = LoggerFactory.getLogger(DownloadController.class);
private final DownloadService downloadService;

@GetMapping("/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
package de.dominikschadow.javasecurity.downloads;

import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.owasp.esapi.errors.AccessControlException;
import org.owasp.esapi.reference.RandomAccessReferenceMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.Resource;
import org.springframework.core.io.UrlResource;
import org.springframework.stereotype.Service;
Expand All @@ -32,8 +31,8 @@
import java.util.Set;

@Service
@Slf4j
public class DownloadService {
private static final Logger log = LoggerFactory.getLogger(DownloadService.class);
private final Set<Object> resources = new HashSet<>();
private final RandomAccessReferenceMap referenceMap = new RandomAccessReferenceMap(resources);
private final String rootLocation;
Expand Down
4 changes: 4 additions & 0 deletions security-logging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
*/
package de.dominikschadow.javasecurity.logging.home;

import lombok.extern.slf4j.Slf4j;
import org.owasp.security.logging.SecurityMarkers;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
Expand All @@ -31,9 +30,8 @@
* @author Dominik Schadow
*/
@Controller
@Slf4j
public class HomeController {
private static final Logger log = LoggerFactory.getLogger(HomeController.class);

@GetMapping("/")
public String home(Model model) {
model.addAttribute("login", new Login("", ""));
Expand Down

0 comments on commit f5ac3e1

Please sign in to comment.