Skip to content

Commit

Permalink
Merge pull request #15 from Strato-YangSungHun/main
Browse files Browse the repository at this point in the history
WebConfig updateWebConfig update
  • Loading branch information
pbcccbeatboard-strato authored Sep 2, 2024
2 parents d18e375 + 1cdf535 commit 30f1f9e
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 30f1f9e

Please sign in to comment.