Skip to content

Commit

Permalink
Merge pull request #31 from SELab-2/feature/frontend-init
Browse files Browse the repository at this point in the history
Feature/frontend init
  • Loading branch information
usserwoutV2 authored Mar 4, 2024
2 parents ae80829 + a83a299 commit cf6b6b1
Show file tree
Hide file tree
Showing 36 changed files with 2,193 additions and 138 deletions.
3 changes: 1 addition & 2 deletions backend/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ EXPOSE 8080
RUN mkdir /app

COPY --from=build /home/gradle/src/build/libs/*.jar /app/spring-boot-application.jar
ENTRYPOINT ["java", "-jar","/app/spring-boot-application.jar"]

ENTRYPOINT ["java", "-jar","/app/spring-boot-application.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
@SpringBootApplication
public class PidgeonApplication {

@RequestMapping("/")
public String home(){
return "hello world form spring!";
}

public static void main(String[] args) {
SpringApplication.run(PidgeonApplication.class, args);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.security.web.SecurityFilterChain;

@Configuration
Expand All @@ -27,7 +28,7 @@ public FilterRegistrationBean<JwtAuthenticationFilter> filterRegistrationBean()

@Bean
public SecurityFilterChain web(HttpSecurity http) throws Exception {
http
http.csrf(AbstractHttpConfigurer::disable)
.authorizeHttpRequests((authorize) -> authorize
.anyRequest().permitAll()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
Expand All @@ -17,6 +18,10 @@ public User testApi(HttpServletRequest request, Auth auth) {
return auth.getUser();
}

@PostMapping("/api/test2")
public String postTest(){
return "Post test succeeded!";
}

@GetMapping("/ping")
public String ping() {
Expand All @@ -25,7 +30,7 @@ public String ping() {

@GetMapping("/")
public String index() {
return "Running!!!...";
return "Running...";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ public User (String name, String firstName, String lastName, String email, List<
this.firstName = firstName;
this.lastName = lastName;
}
}
}
1 change: 1 addition & 0 deletions frontend/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PUBLIC_URL=/
Loading

0 comments on commit cf6b6b1

Please sign in to comment.