score:0

Accepted answer
@Override
public void addViewControllers(ViewControllerRegistry registry) {
    registry.addViewController("/{spring:^[a-zA-Z\\d-_]+}")
            .setViewName("forward:/");
    registry.addViewController("/**/{spring:^[a-zA-Z\\d-_]+}")
            .setViewName("forward:/");
    registry.addViewController("/{spring:^[a-zA-Z\\d-_]+}/**{spring:?!(\\.js|\\.css)$}")
            .setViewName("forward:/");
}

Related Query

More Query from same tag