Skip to content

Commit

Permalink
WebConfig update
Browse files Browse the repository at this point in the history
  • Loading branch information
Strato-YangSungHun committed Sep 2, 2024
1 parent f81483f commit 1cdf535
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/main/java/kr/co/mcmp/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

@Configuration
public class WebConfig implements WebMvcConfigurer {

@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/web/{spring:[a-zA-Z\\-]+}")
.setViewName("forward:/index.html");
registry.addViewController("/web/**/{spring:[a-zA-Z\\-]+}")
.setViewName("forward:/index.html");
registry.addViewController("/web/{spring:[a-zA-Z\\-]+}/**{spring:?!(\\.js|\\.css)$}")
.setViewName("forward:/index.html");
// 모든 경로를 index.html로 리다이렉트
registry.addViewController("/web/{spring:[\\w\\-]+}")
.setViewName("forward:/index.html");
registry.addViewController("/web/**/{spring:[\\w\\-]+}")
.setViewName("forward:/index.html");
registry.addViewController("/web/{spring:[\\w\\-]+}/**{spring:[\\w\\-]+}")
.setViewName("forward:/index.html");
}
}

0 comments on commit 1cdf535

Please sign in to comment.