Polishing
This commit is contained in:
parent
a3789120c9
commit
1899fb37c1
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -52,7 +52,7 @@ public class EncodedResource implements InputStreamSource {
|
|||
/**
|
||||
* Create a new {@code EncodedResource} for the given {@code Resource},
|
||||
* not specifying an explicit encoding or {@code Charset}.
|
||||
* @param resource the {@code Resource} to hold; never {@code null}
|
||||
* @param resource the {@code Resource} to hold (never {@code null})
|
||||
*/
|
||||
public EncodedResource(Resource resource) {
|
||||
this(resource, null, null);
|
||||
|
@ -61,7 +61,7 @@ public class EncodedResource implements InputStreamSource {
|
|||
/**
|
||||
* Create a new {@code EncodedResource} for the given {@code Resource},
|
||||
* using the specified {@code encoding}.
|
||||
* @param resource the {@code Resource} to hold; never {@code null}
|
||||
* @param resource the {@code Resource} to hold (never {@code null})
|
||||
* @param encoding the encoding to use for reading from the resource
|
||||
*/
|
||||
public EncodedResource(Resource resource, String encoding) {
|
||||
|
@ -71,7 +71,7 @@ public class EncodedResource implements InputStreamSource {
|
|||
/**
|
||||
* Create a new {@code EncodedResource} for the given {@code Resource},
|
||||
* using the specified {@code Charset}.
|
||||
* @param resource the {@code Resource} to hold; never {@code null}
|
||||
* @param resource the {@code Resource} to hold (never {@code null})
|
||||
* @param charset the {@code Charset} to use for reading from the resource
|
||||
*/
|
||||
public EncodedResource(Resource resource, Charset charset) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -183,7 +183,7 @@ public abstract class PropertiesLoaderUtils {
|
|||
ResourceUtils.useCachesIfNecessary(con);
|
||||
InputStream is = con.getInputStream();
|
||||
try {
|
||||
if (resourceName != null && resourceName.endsWith(XML_FILE_EXTENSION)) {
|
||||
if (resourceName.endsWith(XML_FILE_EXTENSION)) {
|
||||
props.loadFromXML(is);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -51,7 +51,6 @@ public @interface ActiveProfiles {
|
|||
|
||||
/**
|
||||
* Alias for {@link #profiles}.
|
||||
*
|
||||
* <p>This attribute may <strong>not</strong> be used in conjunction with
|
||||
* {@link #profiles}, but it may be used <em>instead</em> of {@link #profiles}.
|
||||
*/
|
||||
|
@ -60,7 +59,6 @@ public @interface ActiveProfiles {
|
|||
|
||||
/**
|
||||
* The bean definition profiles to activate.
|
||||
*
|
||||
* <p>This attribute may <strong>not</strong> be used in conjunction with
|
||||
* {@link #value}, but it may be used <em>instead</em> of {@link #value}.
|
||||
*/
|
||||
|
@ -70,7 +68,6 @@ public @interface ActiveProfiles {
|
|||
/**
|
||||
* The type of {@link ActiveProfilesResolver} to use for resolving the active
|
||||
* bean definition profiles programmatically.
|
||||
*
|
||||
* @since 4.0
|
||||
* @see ActiveProfilesResolver
|
||||
*/
|
||||
|
@ -79,18 +76,15 @@ public @interface ActiveProfiles {
|
|||
/**
|
||||
* Whether or not bean definition profiles from superclasses should be
|
||||
* <em>inherited</em>.
|
||||
*
|
||||
* <p>The default value is {@code true}, which means that a test
|
||||
* class will <em>inherit</em> bean definition profiles defined by a
|
||||
* test superclass. Specifically, the bean definition profiles for a test
|
||||
* class will be appended to the list of bean definition profiles
|
||||
* defined by a test superclass. Thus, subclasses have the option of
|
||||
* <em>extending</em> the list of bean definition profiles.
|
||||
*
|
||||
* <p>If {@code inheritProfiles} is set to {@code false}, the bean
|
||||
* definition profiles for the test class will <em>shadow</em> and
|
||||
* effectively replace any bean definition profiles defined by a superclass.
|
||||
*
|
||||
* <p>In the following example, the {@code ApplicationContext} for
|
||||
* {@code BaseTest} will be loaded using only the "base"
|
||||
* bean definition profile; beans defined in the "extended" profile
|
||||
|
@ -110,11 +104,9 @@ public @interface ActiveProfiles {
|
|||
* // ...
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* <p>Note: {@code @ActiveProfiles} can be used when loading an
|
||||
* {@code ApplicationContext} from path-based resource locations or
|
||||
* annotated classes.
|
||||
*
|
||||
* @see ContextConfiguration#locations
|
||||
* @see ContextConfiguration#classes
|
||||
* @see ContextConfiguration#inheritLocations
|
||||
|
|
Loading…
Reference in New Issue