Skip to content

Commit

Permalink
enable jpa auditing on securityconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Jan 23, 2025
1 parent b0de277 commit 044eac7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions backend/src/main/java/ch/puzzle/okr/OkrApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
@EnableJpaAuditing
public class OkrApplication {
public static void main(String[] args) {

Expand Down
2 changes: 2 additions & 0 deletions backend/src/main/java/ch/puzzle/okr/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.http.HttpStatus;
import org.springframework.security.authentication.AuthenticationEventPublisher;
import org.springframework.security.authentication.DefaultAuthenticationEventPublisher;
Expand All @@ -40,6 +41,7 @@
@Configuration
@EnableWebSecurity
@EnableMethodSecurity
@EnableJpaAuditing
public class SecurityConfig {
private static final Logger logger = LoggerFactory.getLogger(SecurityConfig.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import ch.puzzle.okr.models.Unit;
import ch.puzzle.okr.models.authorization.AuthorizationUser;
import ch.puzzle.okr.service.business.UnitBusinessService;
import ch.puzzle.okr.service.validation.UnitValidationService;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
Expand All @@ -16,7 +15,8 @@ public class UnitAuthorizationService {
private final UnitBusinessService unitBusinessService;
private final AuthorizationService authorizationService;

public UnitAuthorizationService(UnitBusinessService unitBusinessService, AuthorizationService authorizationService) {
public UnitAuthorizationService(UnitBusinessService unitBusinessService,
AuthorizationService authorizationService) {
this.unitBusinessService = unitBusinessService;
this.authorizationService = authorizationService;
}
Expand Down

0 comments on commit 044eac7

Please sign in to comment.