Skip to content

Commit

Permalink
bring back springboot plz
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank404NotFound committed May 31, 2024
1 parent bfe9f58 commit c84bb9b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
16 changes: 6 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.1</version>
<version>2.6.3</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>edu.ucsb.cs156</groupId>
Expand Down Expand Up @@ -47,7 +47,7 @@
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gateway-mvc</artifactId>
<version>4.1.3</version>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>me.paulschwarz</groupId>
Expand Down Expand Up @@ -89,9 +89,9 @@

<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.5.0</version>
</dependency>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.7.0</version>
</dependency>

<dependency>
<groupId>javax.validation</groupId>
Expand Down Expand Up @@ -190,7 +190,6 @@
<exclude>**/edu/ucsb/cs156/courses/controllers/FrontendController.*</exclude>
<exclude>**/edu/ucsb/cs156/courses/controllers/FrontendProxyController.*</exclude>
<exclude>**/edu/ucsb/cs156/courses/services/CurrentUserServiceImpl.*</exclude>
<exclude>**/${app.packagePath}/services/GrantedAuthoritiesService.*</exclude>
<exclude>**/edu/ucsb/cs156/courses/CoursesApplication.*</exclude>
</excludes>
</configuration>
Expand Down Expand Up @@ -230,10 +229,7 @@
<param>edu.ucsb.cs156.courses.CoursesApplication</param>
<param>edu.ucsb.cs156.courses.config.SecurityConfig</param>
<param>edu.ucsb.cs156.courses.config.SecurityConfig.MyCsrfRequestMatcher</param>
<param>${app.package}.config.SpaCsrfTokenRequestHandler</param>
<param>${app.package}.config.CsrfCookieFilter</param>
<param>edu.ucsb.cs156.courses.config.SpringFoxConfig</param>
<param>${app.package}.services.GrantedAuthoritiesService</param>
</excludedClasses>
<excludedTestClasses></excludedTestClasses>
<outputFormats>
Expand Down Expand Up @@ -392,4 +388,4 @@
</build>
</profile>
</profiles>
</project>
</project>
4 changes: 2 additions & 2 deletions src/main/java/edu/ucsb/cs156/courses/aop/LoggingAspect.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Optional;
import jakarta.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
Expand Down Expand Up @@ -60,4 +60,4 @@ private static Optional<HttpServletRequest> getCurrentHttpRequest() {
.map(ServletRequestAttributes.class::cast)
.map(ServletRequestAttributes::getRequest);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@
import java.util.Optional;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import edu.ucsb.cs156.courses.entities.User;
import edu.ucsb.cs156.courses.repositories.UserRepository;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
Expand Down Expand Up @@ -101,4 +94,4 @@ public boolean isAdmin(String email) {
Optional<User> u = userRepository.findByEmail(email);
return u.isPresent() && u.get().isAdmin();
}
}
}

0 comments on commit c84bb9b

Please sign in to comment.