Merge pull request #6046 from izeye:polish-2016052
* pr/6046: Polish Polish
This commit is contained in:
commit
306a82e652
|
|
@ -1,6 +1,6 @@
|
||||||
=== /autoconfig
|
=== /autoconfig
|
||||||
This endpoint is a report on the Spring Boot auto-configuration process that happened when
|
This endpoint is a report on the Spring Boot auto-configuration process that happened when
|
||||||
your application started up. It lists all the `@Conditional` annotations that were
|
your application started up. It lists all the `@Conditional` annotations that were
|
||||||
evaluated as the context started and in each case it gives an indication of if (and why)
|
evaluated as the context started and in each case it gives an indication of if (and why)
|
||||||
the condition matched. A positive match results in a bean being included in the context,
|
the condition matched. A positive match results in a bean being included in the context,
|
||||||
and a negative result means the opposite (the bean's class may not even be loaded).
|
and a negative result means the opposite (the bean's class may not even be loaded).
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ on the classpath by default) then the Actuator endpoint responses are enhanced w
|
||||||
hypermedia in the form of "links". The default media type for responses is
|
hypermedia in the form of "links". The default media type for responses is
|
||||||
http://stateless.co/hal_specification.html[HAL], resulting in each resource having an
|
http://stateless.co/hal_specification.html[HAL], resulting in each resource having an
|
||||||
extra property called "_links". You can change the media type to another one supported by
|
extra property called "_links". You can change the media type to another one supported by
|
||||||
Spring HATEOAS by providing your own `@EnableHypermedia` annotation and custom providers
|
Spring HATEOAS by providing your own `@EnableHypermedia` annotation and custom providers
|
||||||
as necessary.
|
as necessary.
|
||||||
|
|
||||||
Example enhanced "/metrics" endpoint with additional "_links":
|
Example enhanced "/metrics" endpoint with additional "_links":
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ public class DefaultErrorViewResolver implements ErrorViewResolver, Ordered {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link View} backed by a HTML resource.
|
* {@link View} backed by an HTML resource.
|
||||||
*/
|
*/
|
||||||
private static class HtmlResourceView implements View {
|
private static class HtmlResourceView implements View {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@ public class OnBeanConditionTypeDeductionFailureTests {
|
||||||
fail("Context refresh was successful");
|
fail("Context refresh was successful");
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
ex.printStackTrace();
|
|
||||||
Throwable beanTypeDeductionException = findBeanTypeDeductionException(ex);
|
Throwable beanTypeDeductionException = findBeanTypeDeductionException(ex);
|
||||||
assertThat(beanTypeDeductionException)
|
assertThat(beanTypeDeductionException)
|
||||||
.hasMessage("Failed to deduce bean type for "
|
.hasMessage("Failed to deduce bean type for "
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ public class TemplateAvailabilityProvidersTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getProvderWhenCacheDisabledShouldNotUseCache() throws Exception {
|
public void getProviderWhenCacheDisabledShouldNotUseCache() throws Exception {
|
||||||
given(this.provider.isTemplateAvailable(this.view, this.environment,
|
given(this.provider.isTemplateAvailable(this.view, this.environment,
|
||||||
this.classLoader, this.resourceLoader)).willReturn(true);
|
this.classLoader, this.resourceLoader)).willReturn(true);
|
||||||
this.environment.setProperty("spring.template.provider.cache", "false");
|
this.environment.setProperty("spring.template.provider.cache", "false");
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ content into your application; rather pick only the properties that you need.
|
||||||
# BANNER
|
# BANNER
|
||||||
banner.charset=UTF-8 # Banner file encoding.
|
banner.charset=UTF-8 # Banner file encoding.
|
||||||
banner.location=classpath:banner.txt # Banner file location.
|
banner.location=classpath:banner.txt # Banner file location.
|
||||||
banner.image.location=classpath:banner.gif # (Banner image file location, jpg/png can also be used).
|
banner.image.location=classpath:banner.gif # Banner image file location (jpg/png can also be used).
|
||||||
banner.image.width= # Width of the banner image in chars (default 76)
|
banner.image.width= # Width of the banner image in chars (default 76)
|
||||||
banner.image.height= # Height of the banner image in chars (default based on image height)
|
banner.image.height= # Height of the banner image in chars (default based on image height)
|
||||||
banner.image.margin= # Left hand image margin in chars (default 2)
|
banner.image.margin= # Left hand image margin in chars (default 2)
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ a traditional web container should be placed in `WEB-INF/lib-provided`.
|
||||||
The core class used to support loading nested jars is
|
The core class used to support loading nested jars is
|
||||||
`org.springframework.boot.loader.jar.JarFile`. It allows you to load jar
|
`org.springframework.boot.loader.jar.JarFile`. It allows you to load jar
|
||||||
content from a standard jar file, or from nested child jar data. When first loaded, the
|
content from a standard jar file, or from nested child jar data. When first loaded, the
|
||||||
location of each `JarEntry` is mapped to a physical file offset of the outer jar:
|
location of each `JarEntry` is mapped to a physical file offset of the outer jar:
|
||||||
|
|
||||||
[indent=0]
|
[indent=0]
|
||||||
----
|
----
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ For example, the following declaration:
|
||||||
@DependencyManagementBom("com.example.custom-bom:1.0.0")
|
@DependencyManagementBom("com.example.custom-bom:1.0.0")
|
||||||
----
|
----
|
||||||
|
|
||||||
Will pick up `custom-bom-1.0.0.pom` in a Maven repository under
|
Will pick up `custom-bom-1.0.0.pom` in a Maven repository under
|
||||||
`com/example/custom-versions/1.0.0/`.
|
`com/example/custom-versions/1.0.0/`.
|
||||||
|
|
||||||
When multiple BOMs are specified they are applied in the order that they're declared.
|
When multiple BOMs are specified they are applied in the order that they're declared.
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ such as the user that launched the application.
|
||||||
The banner that is printed on start up can be changed by adding a `banner.txt` file
|
The banner that is printed on start up can be changed by adding a `banner.txt` file
|
||||||
to your classpath, or by setting `banner.location` to the location of such a file.
|
to your classpath, or by setting `banner.location` to the location of such a file.
|
||||||
If the file has an unusual encoding you can set `banner.charset` (default is `UTF-8`).
|
If the file has an unusual encoding you can set `banner.charset` (default is `UTF-8`).
|
||||||
In addition a text file, you can also add a `banner.gif`, `banner.jpg` or `banner.png`
|
In addition to a text file, you can also add a `banner.gif`, `banner.jpg` or `banner.png`
|
||||||
image file to your classpath, or set a `banner.image.location` property. Images will be
|
image file to your classpath, or set a `banner.image.location` property. Images will be
|
||||||
converted into an ASCII art representation and printed above any text banner.
|
converted into an ASCII art representation and printed above any text banner.
|
||||||
|
|
||||||
|
|
@ -1741,7 +1741,7 @@ this:
|
||||||
+- <other public assets>
|
+- <other public assets>
|
||||||
----
|
----
|
||||||
|
|
||||||
To map all `5xx` errors using a freemarker template, you'd have a structure like this:
|
To map all `5xx` errors using a FreeMarker template, you'd have a structure like this:
|
||||||
|
|
||||||
[source,indent=0,subs="verbatim,quotes,attributes"]
|
[source,indent=0,subs="verbatim,quotes,attributes"]
|
||||||
----
|
----
|
||||||
|
|
@ -1750,7 +1750,7 @@ To map all `5xx` errors using a freemarker template, you'd have a structure like
|
||||||
+- java/
|
+- java/
|
||||||
| + <source code>
|
| + <source code>
|
||||||
+- resources/
|
+- resources/
|
||||||
+- template/
|
+- templates/
|
||||||
+- error/
|
+- error/
|
||||||
| +- 5xx.ftl
|
| +- 5xx.ftl
|
||||||
+- <other templates>
|
+- <other templates>
|
||||||
|
|
@ -1786,7 +1786,7 @@ will then pick up any unhandled exceptions.
|
||||||
For applications that aren't using Spring MVC, you can use the `ErrorPageRegistrar`
|
For applications that aren't using Spring MVC, you can use the `ErrorPageRegistrar`
|
||||||
interface to directly register `ErrorPages`. This abstraction works directly with the
|
interface to directly register `ErrorPages`. This abstraction works directly with the
|
||||||
underlying embedded servlet container and will work even if you don't have a Spring MVC
|
underlying embedded servlet container and will work even if you don't have a Spring MVC
|
||||||
`DispatcherServlet`
|
`DispatcherServlet`.
|
||||||
|
|
||||||
|
|
||||||
[source,java,indent=0,subs="verbatim,quotes,attributes"]
|
[source,java,indent=0,subs="verbatim,quotes,attributes"]
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import org.springframework.core.io.ResourceLoader;
|
||||||
import org.springframework.mock.web.MockServletContext;
|
import org.springframework.mock.web.MockServletContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link MockServletContext} implementation for Spring Boot. Respects well know Spring
|
* {@link MockServletContext} implementation for Spring Boot. Respects well-known Spring
|
||||||
* Boot resource locations and uses an empty directory for "/" if no locations can be
|
* Boot resource locations and uses an empty directory for "/" if no locations can be
|
||||||
* found.
|
* found.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ import org.springframework.core.io.ResourceLoader;
|
||||||
import org.springframework.mock.web.MockServletContext;
|
import org.springframework.mock.web.MockServletContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link MockServletContext} implementation for Spring Boot. Respects well know Spring
|
* {@link MockServletContext} implementation for Spring Boot. Respects well-known Spring
|
||||||
* Boot resource locations and uses an empty directory for "/" if no locations can be
|
* Boot resource locations and uses an empty directory for "/" if no locations can be
|
||||||
* found.
|
* found.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ import org.springframework.web.util.UriTemplateHandler;
|
||||||
* Apache Http Client 4.3.2 or better is available (recommended) it will be used as the
|
* Apache Http Client 4.3.2 or better is available (recommended) it will be used as the
|
||||||
* client, and by default configured to ignore cookies and redirects.
|
* client, and by default configured to ignore cookies and redirects.
|
||||||
* <p>
|
* <p>
|
||||||
* Note: To prevent injection problems this class internationally does not extend
|
* Note: To prevent injection problems this class internally does not extend
|
||||||
* {@link RestTemplate}. If you need access to the underlying {@link RestTemplate} use
|
* {@link RestTemplate}. If you need access to the underlying {@link RestTemplate} use
|
||||||
* {@link #getRestTemplate()}.
|
* {@link #getRestTemplate()}.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
{
|
{
|
||||||
"name": "banner.image.location",
|
"name": "banner.image.location",
|
||||||
"type": "org.springframework.core.io.Resource",
|
"type": "org.springframework.core.io.Resource",
|
||||||
"description": "Banner image file location.",
|
"description": "Banner image file location (jpg/png can also be used).",
|
||||||
"defaultValue": "banner.gif"
|
"defaultValue": "banner.gif"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
{
|
{
|
||||||
"name": "banner.image.margin",
|
"name": "banner.image.margin",
|
||||||
"type": "java.lang.Integer",
|
"type": "java.lang.Integer",
|
||||||
"description": "Left hand image height (in chars)."
|
"description": "Left hand image margin (in chars)."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "banner.image.invert",
|
"name": "banner.image.invert",
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,6 @@ public class ImageBannerTests {
|
||||||
AnsiOutput.setEnabled(AnsiOutput.Enabled.NEVER);
|
AnsiOutput.setEnabled(AnsiOutput.Enabled.NEVER);
|
||||||
String banner = printBanner("gradient.gif", "banner.image.width=10",
|
String banner = printBanner("gradient.gif", "banner.image.width=10",
|
||||||
"banner.image.margin=0");
|
"banner.image.margin=0");
|
||||||
System.out.println(banner);
|
|
||||||
assertThat(banner).contains("@#8&o:*. ");
|
assertThat(banner).contains("@#8&o:*. ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue