WebConfig.java 720 Bytes
package com.sigem.gis;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {
    
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        // Enrutador amigable (Friendly URLs sin ".html") para el Frontend
        registry.addViewController("/login").setViewName("forward:/login.html");
        registry.addViewController("/mapas").setViewName("forward:/mapas.html");
        registry.addViewController("/").setViewName("forward:/login.html");
    }
}
GitLab Appliance - Powered by TurnKey Linux