@Component
public class OpenApiGeneratorUtil
extends java.lang.Object
| Constructor and Description |
|---|
OpenApiGeneratorUtil() |
| Modifier and Type | Method and Description |
|---|---|
void |
addURLToClassLoader(java.net.URL url,
java.lang.ClassLoader classLoader)
Add url to class loader.
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,VirtualServiceRequest>> |
generateRestApi(boolean scriptEnabled,
java.lang.String yamlFile,
VirtualServiceRequest request,
java.lang.ClassLoader contextLoader)
Generate rest api map.
|
void |
getYaml(java.io.File file)
Gets yaml.
|
void |
loadInitialYamlFiles()
Load initial yaml files.
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,VirtualServiceRequest>> |
removeRestApi(boolean scriptEnabled,
java.lang.String yamlFile,
VirtualServiceRequest request,
java.lang.ClassLoader contextLoader)
Remove rest api map.
|
@EventListener(value=org.springframework.boot.context.event.ApplicationReadyEvent.class)
public void loadInitialYamlFiles()
throws java.net.MalformedURLException,
java.beans.IntrospectionException
java.net.MalformedURLExceptionjava.beans.IntrospectionExceptionpublic void getYaml(java.io.File file)
file - the filepublic java.util.Map<java.lang.String,java.util.Map<java.lang.String,VirtualServiceRequest>> removeRestApi(boolean scriptEnabled, java.lang.String yamlFile, VirtualServiceRequest request, java.lang.ClassLoader contextLoader) throws java.lang.Exception
scriptEnabled - the script enabledyamlFile - the yaml filerequest - the requestcontextLoader - the context loaderjava.lang.ClassNotFoundException - the class not found exceptionjava.lang.InstantiationException - the instantiation exceptionjava.lang.IllegalAccessException - the illegal access exceptionjava.io.IOException - the io exceptionjava.beans.IntrospectionException - the introspection exceptionjava.lang.Exceptionpublic void addURLToClassLoader(java.net.URL url,
java.lang.ClassLoader classLoader)
throws java.beans.IntrospectionException
url - the urlclassLoader - the class loaderjava.beans.IntrospectionException - the introspection exceptionpublic java.util.Map<java.lang.String,java.util.Map<java.lang.String,VirtualServiceRequest>> generateRestApi(boolean scriptEnabled, java.lang.String yamlFile, VirtualServiceRequest request, java.lang.ClassLoader contextLoader) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, com.fasterxml.jackson.core.JsonProcessingException
scriptEnabled - the script enabledyamlFile - the yaml filerequest - the requestcontextLoader - the context loaderjava.lang.ClassNotFoundException - the class not found exceptionjava.lang.InstantiationException - the instantiation exceptionjava.lang.IllegalAccessException - the illegal access exceptioncom.fasterxml.jackson.core.JsonProcessingException - the json processing exceptionCopyright © 2021. All Rights Reserved.