|
|
@ -16,8 +16,11 @@ import org.springframework.web.servlet.view.BeanNameViewResolver;
|
|
|
|
import org.springframework.web.servlet.view.JstlView;
|
|
|
|
import org.springframework.web.servlet.view.JstlView;
|
|
|
|
import org.springframework.web.servlet.view.UrlBasedViewResolver;
|
|
|
|
import org.springframework.web.servlet.view.UrlBasedViewResolver;
|
|
|
|
import org.springframework.web.servlet.view.json.MappingJackson2JsonView;
|
|
|
|
import org.springframework.web.servlet.view.json.MappingJackson2JsonView;
|
|
|
|
|
|
|
|
import org.springframework.web.servlet.view.xml.MappingJackson2XmlView;
|
|
|
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator;
|
|
|
|
|
|
|
|
|
|
|
|
import cokr.xit.foundation.web.AccessInitializer;
|
|
|
|
import cokr.xit.foundation.web.AccessInitializer;
|
|
|
|
|
|
|
|
|
|
|
@ -101,6 +104,20 @@ public class MvcConfig implements WebMvcConfigurer {
|
|
|
|
return bean;
|
|
|
|
return bean;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**MappingJackson2XmlView를 반환한다.
|
|
|
|
|
|
|
|
* @return MappingJackson2XmlView
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
|
|
|
public MappingJackson2XmlView xmlView() {
|
|
|
|
|
|
|
|
XmlMapper xmlMapper = new XmlMapper();
|
|
|
|
|
|
|
|
xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MappingJackson2XmlView bean = new MappingJackson2XmlView();
|
|
|
|
|
|
|
|
bean.setContentType("application/xml; charset=UTF-8");
|
|
|
|
|
|
|
|
bean.setObjectMapper(xmlMapper);
|
|
|
|
|
|
|
|
return bean;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**CommonsMultipartResolver를 반환한다.
|
|
|
|
/**CommonsMultipartResolver를 반환한다.
|
|
|
|
* @return CommonsMultipartResolver
|
|
|
|
* @return CommonsMultipartResolver
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|