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

org.jsondoc.spring.boot.starter.JSONDocConfig Maven / Gradle / Ivy

There is a newer version: 1.2.23
Show newest version
package org.jsondoc.spring.boot.starter;

import org.jsondoc.springmvc.controller.JSONDocController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(JSONDocProperties.class)
@ConditionalOnClass(JSONDocController.class)
public class JSONDocConfig {
	
	public final static String JSONDOC_PROPERTIES_PREFIX = "jsondoc";
	
	@Autowired
	private JSONDocProperties properties;

	@Bean
	public JSONDocController jController() {
		JSONDocController jsondocController = new JSONDocController(this.properties.getVersion(), this.properties.getBasePath(), this.properties.getPackages());
		jsondocController.setPlaygroundEnabled(this.properties.isPlaygroundEnabled());
		jsondocController.setDisplayMethodAs(this.properties.getDisplayMethodAs());
		return jsondocController;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy