Skip to content
Snippets Groups Projects
Commit 284f0ee9 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

doc for config file

parent 228941c7
No related branches found
No related tags found
1 merge request!56User login with dot produced errors
......@@ -5,6 +5,22 @@ import org.springframework.web.servlet.config.annotation.ContentNegotiationConfi
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/**
* This class is a configuration for spring that disables content type
* recognition based on the "extension" (last part after dot in url). It allows
* API to return json for urls like: http://localhost:8080/minerva/api/users/t.t
*
* More info can be found here:
* <ul>
* <li>https://spring.io/blog/2013/05/11/content-negotiation-using-spring-mvc
* </li>
* <li>https://stackoverflow.com/questions/30793717/spring-throwing-
* httpmediatypenotacceptableexception-could-not-find-acceptable-r</li>
* </ul>
*
* @author Piotr Gawron
*
*/
@Configuration
@EnableWebMvc
public class ContentNegotiationConfig extends WebMvcConfigurerAdapter {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment