security and rest work

This commit is contained in:
eparaschiv
2013-06-02 20:45:26 +03:00
parent 0eea508ede
commit 79269f8a43
6 changed files with 260 additions and 226 deletions

View File

@@ -1,10 +1,16 @@
package org.baeldung.spring;
import java.util.List;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration
@EnableWebMvc
@ComponentScan("org.baeldung.web")
public class WebConfig extends WebMvcConfigurerAdapter {
@@ -12,6 +18,14 @@ public class WebConfig extends WebMvcConfigurerAdapter {
super();
}
// API
// beans
@Override
public void configureMessageConverters(final List<HttpMessageConverter<?>> converters) {
super.configureMessageConverters(converters);
converters.add(new MappingJackson2HttpMessageConverter());
}
//
}