All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.developframework.jsonview.boot.JsonviewWebMvcConfigurer Maven / Gradle / Ivy

package com.github.developframework.jsonview.boot;

import com.github.developframework.jsonview.spring.mvc.DataModelReturnValueHandler;
import com.github.developframework.jsonview.spring.mvc.JsonviewResponseReturnValueHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodReturnValueHandler;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import java.util.List;

@Configuration
public class JsonviewWebMvcConfigurer extends WebMvcConfigurerAdapter {

	@Autowired
	private DataModelReturnValueHandler dataModelReturnValueHandler;

	@Autowired
	private JsonviewResponseReturnValueHandler jsonviewResponseReturnValueHandler;

	@Override
	public void addReturnValueHandlers(List returnValueHandlers) {
		returnValueHandlers.add(jsonviewResponseReturnValueHandler);
		returnValueHandlers.add(dataModelReturnValueHandler);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy