Package io.microsphere.spring.net
Class SpringPropertySourcesURLConnectionAdapter
- java.lang.Object
-
- java.net.URLConnection
-
- io.microsphere.spring.net.SpringPropertySourcesURLConnectionAdapter
-
public class SpringPropertySourcesURLConnectionAdapter extends java.net.URLConnectionTheURLConnectionadapter class is based on the SpringPropertySourcesThe URL pattern : "spring:env:property-sources://{property-name-prefix}/{media-type}":
- {property-name-prefix} : the prefix of property name, for instance : "microsphere." or "microsphere"
- {media-type} : the media type, may be :
"text/properties"(as default if absent) or "text/yaml"
- Since:
- 1.0.0
- Author:
- Mercy
-
-
Field Summary
Fields Modifier and Type Field Description static org.springframework.util.MimeTypeDEFAULT_MEDIA_TYPE
-
Constructor Summary
Constructors Modifier Constructor Description protectedSpringPropertySourcesURLConnectionAdapter(java.net.URL url, org.springframework.core.env.PropertySources propertySources, org.springframework.core.convert.support.ConfigurableConversionService conversionService)Constructs a URL connection to the specified URL.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect()java.io.InputStreamgetInputStream()-
Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getLastModified, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
-
-
-
-
Constructor Detail
-
SpringPropertySourcesURLConnectionAdapter
protected SpringPropertySourcesURLConnectionAdapter(java.net.URL url, org.springframework.core.env.PropertySources propertySources, org.springframework.core.convert.support.ConfigurableConversionService conversionService)Constructs a URL connection to the specified URL. A connection to the object referenced by the URL is not created.- Parameters:
url- the specified URL.propertySources-PropertySourcesconversionService-ConfigurableConversionService
-
-
Method Detail
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException- Overrides:
getInputStreamin classjava.net.URLConnection- Throws:
java.io.IOException
-
connect
public void connect() throws java.io.IOException- Specified by:
connectin classjava.net.URLConnection- Throws:
java.io.IOException
-
-