Last active
March 12, 2020 00:02
-
-
Save gdonega/136dd899920a798c5e84361946c4b53c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.testes.spring.maven.simples.config; | |
import org.springframework.context.annotation.ComponentScan; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.web.servlet.config.annotation.EnableWebMvc; | |
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | |
@Configuration // Faz o Spring mapear essa classe | |
@ComponentScan("com.testes.spring.maven.simples") // Indica onde o Spring deve procurar novos componentes | |
@EnableWebMvc // Ativa o suporte básico do Spring para uma aplicação MVC. Ele, por exemplo, | |
// mapeia os controllers, ativa o suporte de validação, os handlers de | |
// exception, entre outras coisas... | |
public class WebConfig implements WebMvcConfigurer // Essa implementação permite que nós alteremos qualquer configuração | |
// do @EnableWebMvc nessa classe (de uma olhada nas sobreescritas | |
// possíveis) | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment