Skip to content

Commit

Permalink
Merge pull request #27 from edu-pi/feature/issue26
Browse files Browse the repository at this point in the history
[#26]feat: syntax 서버 설정 추가
  • Loading branch information
ujkkk authored Oct 18, 2024
2 parents 51fc001 + ffa3357 commit e0704f9
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/main/java/soma/edupigateway/config/RoutingConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
@Configuration
public class RoutingConfig {

@Value("${server-url.syntax.url}")
private String SYNTAX_URL;
@Value("${server-url.syntax.default-path}")
private String SYNTAX_PATH;

@Value("${server-url.visualize.url}")
private String VISUALIZE_URL;
@Value("${server-url.visualize.default-path}")
private String VISUALIZE_PATH;

@Value("${server-url.db.url}")
private String DB_URL;
@Value("${server-url.db.default-path}")
Expand All @@ -25,11 +35,6 @@ public class RoutingConfig {
// @Value("${server-url.lms.default-path}")
// private String LMS_PATH;

@Value("${server-url.visualize.url}")
private String VISUALIZE_URL;
@Value("${server-url.visualize.default-path}")
private String VISUALIZE_PATH;


@Bean
public RouteLocator gatewayRoutes(RouteLocatorBuilder builder, AuthenticationFilter authorizationFilter) {
Expand All @@ -38,6 +43,9 @@ public RouteLocator gatewayRoutes(RouteLocatorBuilder builder, AuthenticationFil
.filters(f -> f.setStatus(200))
.uri("no://op")) // health check

.route(predicate -> predicate.path(SYNTAX_PATH)
.uri(SYNTAX_URL)) // edupi-syntax

.route(predicate -> predicate.path(VISUALIZE_PATH)
// .filters(f -> f.filter(authorizationFilter.apply(config -> config.setRequiredRole("ROLE_USER"))))
.uri(VISUALIZE_URL)) // edupi-visualize
Expand Down

0 comments on commit e0704f9

Please sign in to comment.