Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/frontend init #31

Merged
merged 8 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading