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

com.nepxion.discovery.console.configuration.ConsoleAutoConfiguration Maven / Gradle / Ivy

There is a newer version: 6.22.0
Show newest version
package com.nepxion.discovery.console.configuration;

/**
 * 

Title: Nepxion Discovery

*

Description: Nepxion Discovery

*

Copyright: Copyright (c) 2017-2050

*

Company: Nepxion

* @author Haojun Ren * @version 1.0 */ import org.springframework.boot.actuate.endpoint.Endpoint; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.web.client.RestTemplate; import com.nepxion.discovery.console.endpoint.ConsoleEndpoint; import com.nepxion.discovery.console.handler.ConsoleErrorHandler; @Configuration // @ComponentScan(basePackages = { "com.nepxion.discovery.console.endpoint" }) @Import(SwaggerConfiguration.class) public class ConsoleAutoConfiguration { static { System.out.println(""); System.out.println("╔═══╗"); System.out.println("╚╗╔╗║"); System.out.println(" ║║║╠╦══╦══╦══╦╗╔╦══╦═╦╗ ╔╗"); System.out.println(" ║║║╠╣══╣╔═╣╔╗║╚╝║║═╣╔╣║ ║║"); System.out.println("╔╝╚╝║╠══║╚═╣╚╝╠╗╔╣║═╣║║╚═╝║"); System.out.println("╚═══╩╩══╩══╩══╝╚╝╚══╩╝╚═╗╔╝"); System.out.println(" ╔═╝║"); System.out.println(" ╚══╝"); System.out.println("Nepxion Discovery - Console v3.3.29"); System.out.println(""); } @ConditionalOnClass(Endpoint.class) protected static class ConsoleEndpointConfiguration { @Bean public ConsoleEndpoint consoleEndpoint() { return new ConsoleEndpoint(); } @Bean public RestTemplate consoleRestTemplate() { RestTemplate restTemplate = new RestTemplate(); restTemplate.setErrorHandler(new ConsoleErrorHandler()); return restTemplate; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy