-1
I am doing a project in java using Spring MVC and when implementing the technology my page stopped being stylized, I already looked for the solution in other questions, in the documentation of spring, and even I stopped other projects using Spring on Github, and the settings are the same as in my project. I don’t know why it doesn’t work, if someone wants to see my entire project is on Github https://github.com/Jo4o-Pedro/Sistema-Lanchonete-.git But I believe from the information here you can help me. Here is the structure of the project:
The methods I’m using in the configuration class:
@Configuration
@EnableWebMvc
@ComponentScan(basePackages = {"lanchonete.com.br.sistemaaps"})
public class AppWebConfig extends WebMvcConfigurationSupport {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
}
// equivalent for <mvc:default-servlet-handler/> tag
@Override
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
configurer.enable();
}
}
And the header of my jsp:
<%@page import="models.Usuario" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset='utf-8'>
<title>Pagina Principal</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel="stylesheet" type="text/css" href="<c:url value="/resources/estiloaps.css" />" />
</head>