Merge branch '1.4.x' into 1.5.x
This commit is contained in:
@@ -330,8 +330,8 @@ consider a different logging implementation.
|
||||
If the above restrictions mean that you cannot use Spring Boot Loader the following
|
||||
alternatives could be considered:
|
||||
|
||||
* http://maven.apache.org/plugins/maven-shade-plugin/[Maven Shade Plugin]
|
||||
* https://maven.apache.org/plugins/maven-shade-plugin/[Maven Shade Plugin]
|
||||
* http://www.jdotsoft.com/JarClassLoader.php[JarClassLoader]
|
||||
* http://one-jar.sourceforge.net[OneJar]
|
||||
* https://sourceforge.net/projects/one-jar/[OneJar]
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ section of your `pom.xml`
|
||||
----
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<!-- ... -->
|
||||
<build>
|
||||
@@ -107,7 +107,7 @@ usual `packaging` element:
|
||||
----
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<!-- ... -->
|
||||
<packaging>jar</packaging>
|
||||
<!-- ... -->
|
||||
@@ -135,7 +135,7 @@ need to mark the embedded container dependencies as "`provided`", e.g:
|
||||
----
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<!-- ... -->
|
||||
<packaging>war</packaging>
|
||||
<!-- ... -->
|
||||
@@ -647,7 +647,7 @@ from `spring-boot-starter-parent`. Please refer to the
|
||||
==== Configuring Gradle to produce a pom that imports dependency management
|
||||
The following is an example of configuring Gradle to generate a pom that imports
|
||||
the dependency management provided by `spring-boot-dependencies`. Please refer to the
|
||||
http://www.gradle.org/docs/current/userguide/userguide.html[Gradle User Guide] for
|
||||
https://www.gradle.org/docs/current/userguide/userguide.html[Gradle User Guide] for
|
||||
further information.
|
||||
|
||||
[source,groovy,indent=0,subs="verbatim,attributes"]
|
||||
@@ -859,7 +859,7 @@ If your archive already includes libraries you can use `Libraries.NONE`.
|
||||
[[build-tool-plugins-find-a-main-class]]
|
||||
=== Finding a main class
|
||||
If you don't use `Repackager.setMainClass()` to specify a main class, the repackager will
|
||||
use http://asm.ow2.org/[ASM] to read class files and attempt to find a suitable class
|
||||
use https://asm.ow2.org/[ASM] to read class files and attempt to find a suitable class
|
||||
with a `public static void main(String[] args)` method. An exception is thrown if more
|
||||
than one candidate is found.
|
||||
|
||||
|
||||
@@ -46,10 +46,10 @@ stand-alone executable jar applications, as well as traditional `.war` packaged
|
||||
applications.
|
||||
|
||||
Once you've built your application (using, for example, `mvn clean package`) and
|
||||
http://docs.cloudfoundry.org/devguide/installcf/install-go-cli.html[installed the `cf`
|
||||
https://docs.cloudfoundry.org/devguide/installcf/install-go-cli.html[installed the `cf`
|
||||
command line tool], simply deploy your application using the `cf push` command as follows,
|
||||
substituting the path to your compiled `.jar`. Be sure to have
|
||||
http://docs.cloudfoundry.org/devguide/installcf/whats-new-v6.html#login[logged in with your
|
||||
https://docs.cloudfoundry.org/devguide/installcf/whats-new-v6.html#login[logged in with your
|
||||
`cf` command line client] before pushing an application.
|
||||
|
||||
[indent=0,subs="verbatim,quotes,attributes"]
|
||||
@@ -57,9 +57,9 @@ http://docs.cloudfoundry.org/devguide/installcf/whats-new-v6.html#login[logged i
|
||||
$ cf push acloudyspringtime -p target/demo-0.0.1-SNAPSHOT.jar
|
||||
----
|
||||
|
||||
See the http://docs.cloudfoundry.org/devguide/installcf/whats-new-v6.html#push[`cf push`
|
||||
See the https://docs.cloudfoundry.org/devguide/installcf/whats-new-v6.html#push[`cf push`
|
||||
documentation] for more options. If there is a Cloud Foundry
|
||||
http://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html[`manifest.yml`]
|
||||
https://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html[`manifest.yml`]
|
||||
file present in the same directory, it will be consulted.
|
||||
|
||||
NOTE: Here we are substituting `acloudyspringtime` for whatever value you give `cf`
|
||||
@@ -107,7 +107,7 @@ It's easy to then verify the status of the deployed application:
|
||||
|
||||
Once Cloud Foundry acknowledges that your application has been deployed, you should be
|
||||
able to hit the application at the URI given, in this case
|
||||
`\http://acloudyspringtime.cfapps.io/`.
|
||||
`\https://acloudyspringtime.cfapps.io/`.
|
||||
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ access application information (such as the public URL of the application) and s
|
||||
information (such as database credentials). See `CloudFoundryVcapEnvironmentPostProcessor`
|
||||
Javadoc for complete details.
|
||||
|
||||
TIP: The http://cloud.spring.io/spring-cloud-connectors/[Spring Cloud Connectors] project
|
||||
TIP: The https://cloud.spring.io/spring-cloud-connectors/[Spring Cloud Connectors] project
|
||||
is a better fit for tasks such as configuring a DataSource. Spring Boot includes
|
||||
auto-configuration support and a `spring-boot-starter-cloud-connectors` starter.
|
||||
|
||||
@@ -205,7 +205,7 @@ This should be everything you need. The most common workflow for Heroku deployme
|
||||
Downloading: https://repo.spring.io/...
|
||||
Downloaded: https://repo.spring.io/... (818 B at 1.8 KB/sec)
|
||||
....
|
||||
Downloaded: http://s3pository.heroku.com/jvm/... (152 KB at 595.3 KB/sec)
|
||||
Downloaded: https://s3pository.heroku.com/jvm/... (152 KB at 595.3 KB/sec)
|
||||
[INFO] Installing /tmp/build_0c35a5d2-a067-4abc-a232-14b1fb7a8229/target/...
|
||||
[INFO] Installing /tmp/build_0c35a5d2-a067-4abc-a232-14b1fb7a8229/pom.xml ...
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
@@ -221,7 +221,7 @@ This should be everything you need. The most common workflow for Heroku deployme
|
||||
|
||||
-----> Compressing... *done*, 70.4MB
|
||||
-----> Launching... *done*, v6
|
||||
http://agile-sierra-1405.herokuapp.com/ *deployed to Heroku*
|
||||
https://agile-sierra-1405.herokuapp.com/ *deployed to Heroku*
|
||||
|
||||
To git@heroku.com:agile-sierra-1405.git
|
||||
* [new branch] master -> master
|
||||
@@ -422,11 +422,11 @@ and then configure and start the necessary resources on AWS:
|
||||
Creating security group boxfuse-sg_axelfontaine/myapp:1.0 ...
|
||||
Launching t2.micro instance of axelfontaine/myapp:1.0 (ami-d23f38cf) in eu-central-1 ...
|
||||
Instance launched in 00:30.306s -> i-92ef9f53
|
||||
Waiting for AWS to boot Instance i-92ef9f53 and Payload to start at http://52.28.235.61/ ...
|
||||
Payload started in 00:29.266s -> http://52.28.235.61/
|
||||
Waiting for AWS to boot Instance i-92ef9f53 and Payload to start at https://52.28.235.61/ ...
|
||||
Payload started in 00:29.266s -> https://52.28.235.61/
|
||||
Remapping Elastic IP 52.28.233.167 to i-92ef9f53 ...
|
||||
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
|
||||
Deployment completed successfully. axelfontaine/myapp:1.0 is up and running at http://myapp-axelfontaine.boxfuse.io/
|
||||
Deployment completed successfully. axelfontaine/myapp:1.0 is up and running at https://myapp-axelfontaine.boxfuse.io/
|
||||
----
|
||||
|
||||
Your application should now be up and running on AWS.
|
||||
@@ -694,7 +694,7 @@ that `run` command is used by default.
|
||||
Note that unlike when running as an `init.d` service, user that runs the application, PID
|
||||
file and console log file are managed by `systemd` itself and therefore must be configured
|
||||
using appropriate fields in '`service`' script. Consult the
|
||||
http://www.freedesktop.org/software/systemd/man/systemd.service.html[service unit
|
||||
https://www.freedesktop.org/software/systemd/man/systemd.service.html[service unit
|
||||
configuration man page] for more details.
|
||||
|
||||
To flag the application to start automatically on system boot use the following command:
|
||||
@@ -856,7 +856,7 @@ The following environment properties are supported with the default script:
|
||||
NOTE: The `PID_FOLDER`, `LOG_FOLDER` and `LOG_FILENAME` variables are only valid for an
|
||||
`init.d` service. With `systemd` the equivalent customizations are made using '`service`'
|
||||
script. Check the
|
||||
http://www.freedesktop.org/software/systemd/man/systemd.service.html[service unit
|
||||
https://www.freedesktop.org/software/systemd/man/systemd.service.html[service unit
|
||||
configuration man page] for more details.
|
||||
|
||||
[[deployment-script-customization-conf-file]]
|
||||
@@ -892,7 +892,7 @@ your Spring Boot application.
|
||||
|
||||
[[deployment-whats-next]]
|
||||
== What to read next
|
||||
Check out the http://www.cloudfoundry.com/[Cloud Foundry],
|
||||
Check out the https://www.cloudfoundry.org[Cloud Foundry],
|
||||
https://www.heroku.com/[Heroku], https://www.openshift.com[OpenShift] and
|
||||
https://boxfuse.com[Boxfuse] web sites for more information about the kinds of features
|
||||
that a PaaS can offer. These are just four of the most popular Java PaaS providers, since
|
||||
|
||||
@@ -31,10 +31,10 @@ Having trouble with Spring Boot, We'd like to help!
|
||||
* Try the <<howto.adoc#howto, How-to's>> -- they provide solutions to the most common
|
||||
questions.
|
||||
* Learn the Spring basics -- Spring Boot builds on many other Spring projects, check
|
||||
the http://spring.io[spring.io] web-site for a wealth of reference documentation. If
|
||||
you are just starting out with Spring, try one of the http://spring.io/guides[guides].
|
||||
* Ask a question - we monitor http://stackoverflow.com[stackoverflow.com] for questions
|
||||
tagged with http://stackoverflow.com/tags/spring-boot[`spring-boot`].
|
||||
the https://spring.io[spring.io] web-site for a wealth of reference documentation. If
|
||||
you are just starting out with Spring, try one of the https://spring.io/guides[guides].
|
||||
* Ask a question - we monitor https://stackoverflow.com[stackoverflow.com] for questions
|
||||
tagged with https://stackoverflow.com/tags/spring-boot[`spring-boot`].
|
||||
* Report bugs with Spring Boot at https://github.com/spring-projects/spring-boot/issues.
|
||||
|
||||
NOTE: All of Spring Boot is open source, including the documentation! If you find problems
|
||||
|
||||
@@ -36,7 +36,7 @@ diverge from the defaults.
|
||||
|
||||
[[getting-started-system-requirements]]
|
||||
== System Requirements
|
||||
By default, Spring Boot {spring-boot-version} requires http://www.java.com[Java 7] and
|
||||
By default, Spring Boot {spring-boot-version} requires https://www.java.com[Java 7] and
|
||||
Spring Framework {spring-version} or above. You can use Spring Boot with Java 6 with some
|
||||
additional configuration. See <<howto.adoc#howto-use-java-6>> for more details.
|
||||
|
||||
@@ -93,7 +93,7 @@ You can also deploy Spring Boot applications to any Servlet 3.0+ compatible cont
|
||||
[[getting-started-installing-spring-boot]]
|
||||
== Installing Spring Boot
|
||||
Spring Boot can be used with "`classic`" Java development tools or installed as a command
|
||||
line tool. Regardless, you will need http://www.java.com[Java SDK v1.6] or higher. You
|
||||
line tool. Regardless, you will need https://www.java.com[Java SDK v1.6] or higher. You
|
||||
should check your current Java installation before you begin:
|
||||
|
||||
[indent=0]
|
||||
@@ -126,7 +126,7 @@ build tool that supports dependency management (such as Maven or Gradle).
|
||||
[[getting-started-maven-installation]]
|
||||
==== Maven installation
|
||||
Spring Boot is compatible with Apache Maven 3.2 or above. If you don't already have Maven
|
||||
installed you can follow the instructions at http://maven.apache.org.
|
||||
installed you can follow the instructions at https://maven.apache.org.
|
||||
|
||||
TIP: On many operating systems Maven can be installed via a package manager. If you're an
|
||||
OSX Homebrew user try `brew install maven`. Ubuntu users can run
|
||||
@@ -145,7 +145,7 @@ Here is a typical `pom.xml` file:
|
||||
----
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.example</groupId>
|
||||
@@ -216,7 +216,7 @@ scope.
|
||||
[[getting-started-gradle-installation]]
|
||||
==== Gradle installation
|
||||
Spring Boot is compatible with Gradle 2 (2.9 or later) and Gradle 3. If you don't already
|
||||
have Gradle installed you can follow the instructions at http://www.gradle.org.
|
||||
have Gradle installed you can follow the instructions at https://www.gradle.org.
|
||||
|
||||
Spring Boot dependencies can be declared using the `org.springframework.boot` `group`.
|
||||
Typically your project will declare dependencies to one or more
|
||||
@@ -281,8 +281,8 @@ endif::[]
|
||||
[[getting-started-installing-the-cli]]
|
||||
=== Installing the Spring Boot CLI
|
||||
The Spring Boot CLI is a command line tool that can be used if you want to quickly
|
||||
prototype with Spring. It allows you to run http://groovy.codehaus.org/[Groovy] scripts,
|
||||
which means that you have a familiar Java-like syntax, without so much boilerplate code.
|
||||
prototype with Spring. It allows you to run http://groovy-lang.org[Groovy] scripts, which
|
||||
means that you have a familiar Java-like syntax, without so much boilerplate code.
|
||||
|
||||
You don't need to use the CLI to work with Spring Boot but it's definitely the quickest
|
||||
way to get a Spring application off the ground.
|
||||
@@ -311,7 +311,7 @@ classpath is set correctly).
|
||||
==== Installation with SDKMAN!
|
||||
SDKMAN! (The Software Development Kit Manager) can be used for managing multiple versions of
|
||||
various binary SDKs, including Groovy and the Spring Boot CLI.
|
||||
Get SDKMAN! from http://sdkman.io and install Spring Boot with
|
||||
Get SDKMAN! from https://sdkman.io and install Spring Boot with
|
||||
|
||||
[indent=0,subs="verbatim,quotes,attributes"]
|
||||
----
|
||||
@@ -358,7 +358,7 @@ You can see it by doing this:
|
||||
|
||||
[[getting-started-homebrew-cli-installation]]
|
||||
==== OSX Homebrew installation
|
||||
If you are on a Mac and using http://brew.sh/[Homebrew], all you need to do to install
|
||||
If you are on a Mac and using https://brew.sh/[Homebrew], all you need to do to install
|
||||
the Spring Boot CLI is:
|
||||
|
||||
[indent=0]
|
||||
@@ -376,7 +376,7 @@ Just execute `brew update` and try again.
|
||||
|
||||
[[getting-started-macports-cli-installation]]
|
||||
==== MacPorts installation
|
||||
If you are on a Mac and using http://www.macports.org/[MacPorts], all you need to do to
|
||||
If you are on a Mac and using https://www.macports.org/[MacPorts], all you need to do to
|
||||
install the Spring Boot CLI is:
|
||||
|
||||
[indent=0]
|
||||
@@ -389,8 +389,8 @@ install the Spring Boot CLI is:
|
||||
[[getting-started-cli-command-line-completion]]
|
||||
==== Command-line completion
|
||||
Spring Boot CLI ships with scripts that provide command completion for
|
||||
http://en.wikipedia.org/wiki/Bash_%28Unix_shell%29[BASH] and
|
||||
http://en.wikipedia.org/wiki/Zsh[zsh] shells. You can `source` the script (also named
|
||||
https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29[BASH] and
|
||||
https://en.wikipedia.org/wiki/Zsh[zsh] shells. You can `source` the script (also named
|
||||
`spring`) in any shell, or put it in your personal or system-wide bash completion
|
||||
initialization. On a Debian system the system-wide scripts are in `/shell-completion/bash`
|
||||
and all scripts in that directory are executed when a new shell starts. To run the script
|
||||
@@ -467,7 +467,7 @@ support it.
|
||||
|
||||
[TIP]
|
||||
====
|
||||
The http://spring.io[spring.io] web site contains many "`Getting Started`" guides
|
||||
The https://spring.io[spring.io] web site contains many "`Getting Started`" guides
|
||||
that use Spring Boot. If you're looking to solve a specific problem; check there first.
|
||||
|
||||
You can shortcut the steps below by going to https://start.spring.io and choosing the
|
||||
@@ -510,7 +510,7 @@ will be used to build your project. Open your favorite text editor and add the f
|
||||
----
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.example</groupId>
|
||||
@@ -822,12 +822,12 @@ As before, to gracefully exit the application hit `ctrl-c`.
|
||||
== What to read next
|
||||
Hopefully this section has provided you with some of the Spring Boot basics, and got you
|
||||
on your way to writing your own applications. If you're a task-oriented type of
|
||||
developer you might want to jump over to http://spring.io and check out some of the
|
||||
http://spring.io/guides/[getting started] guides that solve specific
|
||||
developer you might want to jump over to https://spring.io and check out some of the
|
||||
https://spring.io/guides/[getting started] guides that solve specific
|
||||
"`How do I do that with Spring`" problems; we also have Spring Boot-specific
|
||||
_<<howto.adoc#howto, How-to>>_ reference documentation.
|
||||
|
||||
The http://github.com/{github-repo}[Spring Boot repository] has also a
|
||||
The https://github.com/{github-repo}[Spring Boot repository] has also a
|
||||
{github-code}/spring-boot-samples[bunch of samples] you can run. The samples are
|
||||
independent of the rest of the code (that is you don't need to build the rest to run
|
||||
or use the samples).
|
||||
|
||||
@@ -8,7 +8,7 @@ that often arise when using Spring Boot. This is by no means an exhaustive list,
|
||||
does cover quite a lot.
|
||||
|
||||
If you are having a specific problem that we don't cover here, you might want to check out
|
||||
http://stackoverflow.com/tags/spring-boot[stackoverflow.com] to see if someone has
|
||||
https://stackoverflow.com/tags/spring-boot[stackoverflow.com] to see if someone has
|
||||
already provided an answer; this is also a great place to ask new questions (please use
|
||||
the `spring-boot` tag).
|
||||
|
||||
@@ -356,7 +356,7 @@ token of the `maven-resources-plugins` has been changed from `+${*}+` to `@` (i.
|
||||
`@maven.token@` instead of `${maven.token}`) to prevent conflicts with Spring-style
|
||||
placeholders. If you have enabled maven filtering for the `application.properties`
|
||||
directly, you may want to also change the default filter token to use
|
||||
http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#delimiters[other delimiters].
|
||||
https://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#delimiters[other delimiters].
|
||||
|
||||
NOTE: In this specific case the port binding will work in a PaaS environment like Heroku
|
||||
and Cloud Foundry, since in those two platforms the `PORT` environment variable is set
|
||||
@@ -1543,7 +1543,7 @@ include::{code-examples}/web/client/RestTemplateProxyCustomizationExample.java[t
|
||||
== Logging
|
||||
|
||||
Spring Boot has no mandatory logging dependency, except for the Commons Logging API, of
|
||||
which there are many implementations to choose from. To use http://logback.qos.ch[Logback]
|
||||
which there are many implementations to choose from. To use https://logback.qos.ch[Logback]
|
||||
you need to include it and `jcl-over-slf4j` (which implements the Commons Logging API) on
|
||||
the classpath. The simplest way to do that is through the starters which all depend on
|
||||
`spring-boot-starter-logging`. For a web application you only need
|
||||
@@ -1647,7 +1647,7 @@ You also need to add `logging.file` to your `application.properties`:
|
||||
|
||||
[[howto-configure-log4j-for-logging]]
|
||||
=== Configure Log4j for logging
|
||||
Spring Boot supports http://logging.apache.org/log4j/2.x[Log4j 2] for logging
|
||||
Spring Boot supports https://logging.apache.org/log4j/2.x[Log4j 2] for logging
|
||||
configuration if it is on the classpath. If you are using the starters for
|
||||
assembling dependencies that means you have to exclude Logback and then include log4j 2
|
||||
instead. If you aren't using the starters then you need to provide `jcl-over-slf4j`
|
||||
@@ -2236,8 +2236,10 @@ initialization explicitly using `spring.batch.initializer.enabled=false`.
|
||||
|
||||
[[howto-use-a-higher-level-database-migration-tool]]
|
||||
=== Use a higher-level database migration tool
|
||||
Spring Boot supports two higher-level migration tools: http://flywaydb.org/[Flyway]
|
||||
and http://www.liquibase.org/[Liquibase].
|
||||
Spring Boot supports two higher-level migration tools: https://flywaydb.org/[Flyway]
|
||||
and https://www.liquibase.org/[Liquibase].
|
||||
|
||||
|
||||
|
||||
[[howto-execute-flyway-database-migrations-on-startup]]
|
||||
==== Execute Flyway database migrations on startup
|
||||
@@ -2276,7 +2278,7 @@ Boot will call `Flyway.migrate()` to perform the database migration. If you woul
|
||||
more control, provide a `@Bean` that implements
|
||||
{sc-spring-boot-autoconfigure}/flyway/FlywayMigrationStrategy.{sc-ext}[`FlywayMigrationStrategy`].
|
||||
|
||||
TIP: If you want to make use of http://flywaydb.org/documentation/callbacks.html[Flyway
|
||||
TIP: If you want to make use of https://flywaydb.org/documentation/callbacks.html[Flyway
|
||||
callbacks], those scripts should also live in the `classpath:db/migration` folder.
|
||||
|
||||
By default Flyway will autowire the (`@Primary`) `DataSource` in your context and
|
||||
@@ -2485,7 +2487,7 @@ for details of available settings) and `SECURITY` section of
|
||||
=== Change the AuthenticationManager and add user accounts
|
||||
If you provide a `@Bean` of type `AuthenticationManager` the default one will not be
|
||||
created, so you have the full feature set of Spring Security available (e.g.
|
||||
http://docs.spring.io/spring-security/site/docs/current/reference/htmlsingle/#jc-authentication[various authentication options]).
|
||||
https://docs.spring.io/spring-security/site/docs/current/reference/htmlsingle/#jc-authentication[various authentication options]).
|
||||
|
||||
Spring Security also provides a convenient `AuthenticationManagerBuilder` which can be
|
||||
used to build an `AuthenticationManager` with common options. The recommended way to
|
||||
@@ -2628,7 +2630,7 @@ for other Groovy customization options.
|
||||
[[howto-reload-fast-restart]]
|
||||
=== Fast application restarts
|
||||
The `spring-boot-devtools` module includes support for automatic application restarts.
|
||||
Whilst not as fast as technologies such as http://zeroturnaround.com/software/jrebel/[JRebel]
|
||||
Whilst not as fast as technologies such as https://zeroturnaround.com/software/jrebel/[JRebel]
|
||||
or https://github.com/spring-projects/spring-loaded[Spring Loaded] it's usually
|
||||
significantly faster than a "`cold start`". You should probably give it a try before
|
||||
investigating some of the more complex reload options discussed below.
|
||||
@@ -3317,7 +3319,7 @@ For a non-web application it should be easy (throw away the code that creates yo
|
||||
`ApplicationContext` and replace it with calls to `SpringApplication` or
|
||||
`SpringApplicationBuilder`). Spring MVC web applications are generally amenable to first
|
||||
creating a deployable war application, and then migrating it later to an executable war
|
||||
and/or jar. Useful reading is in the http://spring.io/guides/gs/convert-jar-to-war/[Getting
|
||||
and/or jar. Useful reading is in the https://spring.io/guides/gs/convert-jar-to-war/[Getting
|
||||
Started Guide on Converting a jar to a war].
|
||||
|
||||
Create a deployable war by extending `SpringBootServletInitializer` (e.g. in a class
|
||||
@@ -3458,9 +3460,9 @@ rather than the version that pre-installed with the server. You can do this by a
|
||||
xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
||||
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd
|
||||
https://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd
|
||||
http://xmlns.oracle.com/weblogic/weblogic-web-app
|
||||
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
|
||||
https://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
|
||||
<wls:container-descriptor>
|
||||
<wls:prefer-application-packages>
|
||||
<wls:package-name>org.slf4j</wls:package-name>
|
||||
@@ -3488,7 +3490,7 @@ but the rest of it is normal for a Spring application in Servlet 2.5. Example:
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee https://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
||||
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
|
||||
@@ -10,8 +10,8 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson;
|
||||
:spring-boot-repo: snapshot
|
||||
:github-tag: master
|
||||
:spring-boot-docs-version: current
|
||||
:spring-boot-docs: http://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/reference
|
||||
:spring-boot-docs-current: http://docs.spring.io/spring-boot/docs/current/reference
|
||||
:spring-boot-docs: https://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/reference
|
||||
:spring-boot-docs-current: https://docs.spring.io/spring-boot/docs/current/reference
|
||||
:github-repo: spring-projects/spring-boot
|
||||
:github-raw: https://raw.github.com/{github-repo}/{github-tag}
|
||||
:github-code: https://github.com/{github-repo}/tree/{github-tag}
|
||||
@@ -26,7 +26,7 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson;
|
||||
:sc-spring-boot-test: {github-code}/spring-boot-test/src/main/java/org/springframework/boot/test
|
||||
:sc-spring-boot-test-autoconfigure: {github-code}/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure
|
||||
:dc-ext: html
|
||||
:dc-root: http://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/api
|
||||
:dc-root: https://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/api
|
||||
:dc-spring-boot: {dc-root}/org/springframework/boot
|
||||
:dc-spring-boot-autoconfigure: {dc-root}/org/springframework/boot/autoconfigure
|
||||
:dc-spring-boot-actuator: {dc-root}/org/springframework/boot/actuate
|
||||
@@ -34,21 +34,21 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson;
|
||||
:dc-spring-boot-test-autoconfigure: {dc-root}/org/springframework/boot/test/autoconfigure
|
||||
:dependency-management-plugin: https://github.com/spring-gradle-plugins/dependency-management-plugin
|
||||
:dependency-management-plugin-documentation: {dependency-management-plugin}/blob/master/README.md
|
||||
:spring-boot-maven-plugin-site: http://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/maven-plugin
|
||||
:spring-boot-maven-plugin-site: https://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/maven-plugin
|
||||
:spring-initializr-reference: https://docs.spring.io/initializr/docs/current/reference/htmlsingle
|
||||
:spring-reference: http://docs.spring.io/spring/docs/{spring-docs-version}/spring-framework-reference/htmlsingle
|
||||
:spring-security-reference: http://docs.spring.io/spring-security/site/docs/{spring-security-docs-version}/reference/htmlsingle
|
||||
:spring-security-oauth2-reference: http://projects.spring.io/spring-security-oauth/docs/oauth2.html
|
||||
:spring-webservices-reference: http://docs.spring.io/spring-ws/docs/{spring-webservices-docs-version}/reference/htmlsingle
|
||||
:spring-javadoc: http://docs.spring.io/spring/docs/{spring-docs-version}/javadoc-api/org/springframework
|
||||
:spring-amqp-javadoc: http://docs.spring.io/spring-amqp/docs/current/api/org/springframework/amqp
|
||||
:spring-batch-javadoc: http://docs.spring.io/spring-batch/apidocs/org/springframework/batch
|
||||
:spring-data-javadoc: http://docs.spring.io/spring-data/jpa/docs/current/api/org/springframework/data/jpa
|
||||
:spring-data-commons-javadoc: http://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data
|
||||
:spring-data-mongo-javadoc: http://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb
|
||||
:spring-data-rest-javadoc: http://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest
|
||||
:gradle-userguide: http://www.gradle.org/docs/current/userguide
|
||||
:ant-manual: http://ant.apache.org/manual
|
||||
:spring-reference: https://docs.spring.io/spring/docs/{spring-docs-version}/spring-framework-reference/htmlsingle
|
||||
:spring-security-reference: https://docs.spring.io/spring-security/site/docs/{spring-security-docs-version}/reference/htmlsingle
|
||||
:spring-security-oauth2-reference: https://projects.spring.io/spring-security-oauth/docs/oauth2.html
|
||||
:spring-webservices-reference: https://docs.spring.io/spring-ws/docs/{spring-webservices-docs-version}/reference/htmlsingle
|
||||
:spring-javadoc: https://docs.spring.io/spring/docs/{spring-docs-version}/javadoc-api/org/springframework
|
||||
:spring-amqp-javadoc: https://docs.spring.io/spring-amqp/docs/current/api/org/springframework/amqp
|
||||
:spring-batch-javadoc: https://docs.spring.io/spring-batch/apidocs/org/springframework/batch
|
||||
:spring-data-javadoc: https://docs.spring.io/spring-data/jpa/docs/current/api/org/springframework/data/jpa
|
||||
:spring-data-commons-javadoc: https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data
|
||||
:spring-data-mongo-javadoc: https://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb
|
||||
:spring-data-rest-javadoc: https://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest
|
||||
:gradle-userguide: https://www.gradle.org/docs/current/userguide
|
||||
:ant-manual: https://ant.apache.org/manual
|
||||
:code-examples: ../java/org/springframework/boot
|
||||
:test-examples: ../../test/java/org/springframework/boot
|
||||
:gradle-user-guide: https://docs.gradle.org/2.14.1/userguide
|
||||
|
||||
@@ -212,9 +212,9 @@ For example, to mark _all_ endpoints as sensitive except `info`:
|
||||
[[production-ready-endpoint-hypermedia]]
|
||||
=== Hypermedia for actuator MVC endpoints
|
||||
If `endpoints.hypermedia.enabled` is set to `true` and
|
||||
http://projects.spring.io/spring-hateoas[Spring HATEOAS] is on the classpath (e.g.
|
||||
https://projects.spring.io/spring-hateoas[Spring HATEOAS] is on the classpath (e.g.
|
||||
through the `spring-boot-starter-hateoas` or if you are using
|
||||
http://projects.spring.io/spring-data-rest[Spring Data REST]) then the HTTP endpoints
|
||||
https://projects.spring.io/spring-data-rest[Spring Data REST]) then the HTTP endpoints
|
||||
from the Actuator are enhanced with hypermedia links, and a "`discovery page`" is added
|
||||
with links to all the endpoints. The "`discovery page`" is available on `/actuator` by
|
||||
default. It is implemented as an endpoint, allowing properties to be used to configure
|
||||
@@ -234,8 +234,8 @@ an HTML "`discovery page`", in the form of the HAL Browser, is also provided.
|
||||
|
||||
[[production-ready-endpoint-cors]]
|
||||
=== CORS support
|
||||
http://en.wikipedia.org/wiki/Cross-origin_resource_sharing[Cross-origin resource sharing]
|
||||
(CORS) is a http://www.w3.org/TR/cors/[W3C specification] that allows you to specify in a
|
||||
https://en.wikipedia.org/wiki/Cross-origin_resource_sharing[Cross-origin resource sharing]
|
||||
(CORS) is a https://www.w3.org/TR/cors/[W3C specification] that allows you to specify in a
|
||||
flexible way what kind of cross domain requests are authorized. Actuator's MVC endpoints
|
||||
can be configured to support such scenarios.
|
||||
|
||||
@@ -245,7 +245,7 @@ CORS support is disabled by default and is only enabled once the
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
endpoints.cors.allowed-origins=http://example.com
|
||||
endpoints.cors.allowed-origins=https://example.com
|
||||
endpoints.cors.allowed-methods=GET,POST
|
||||
----
|
||||
|
||||
@@ -961,7 +961,7 @@ authentication will be applied and you should see a message like this:
|
||||
----
|
||||
|
||||
Linux and OSX users can use `ssh` to connect to the remote shell, Windows users can
|
||||
download and install http://www.putty.org/[PuTTY].
|
||||
download and install https://www.putty.org/[PuTTY].
|
||||
|
||||
[indent=0,subs="attributes"]
|
||||
----
|
||||
@@ -1064,7 +1064,7 @@ In addition to new commands, it is also possible to extend other CRaSH shell fea
|
||||
All Spring Beans that extend `org.crsh.plugin.CRaSHPlugin` will be automatically
|
||||
registered with the shell.
|
||||
|
||||
For more information please refer to the http://www.crashub.org/[CRaSH reference
|
||||
For more information please refer to the https://www.crashub.org/[CRaSH reference
|
||||
documentation].
|
||||
|
||||
|
||||
@@ -1273,7 +1273,7 @@ Here is a simple example that counts the number of times that a method is invoke
|
||||
|
||||
TIP: You can use any string as a metric name but you should follow guidelines of your chosen
|
||||
store/graphing technology. Some good guidelines for Graphite are available on
|
||||
http://matt.aimonetti.net/posts/2013/06/26/practical-guide-to-graphite-monitoring/[Matt Aimonetti's Blog].
|
||||
https://matt.aimonetti.net/posts/2013/06/26/practical-guide-to-graphite-monitoring/[Matt Aimonetti's Blog].
|
||||
|
||||
|
||||
|
||||
@@ -1392,8 +1392,8 @@ recommendations.
|
||||
[[production-ready-metric-writers-export-to-open-tsdb]]
|
||||
==== Example: Export to Open TSDB
|
||||
If you provide a `@Bean` of type `OpenTsdbGaugeWriter` and mark it
|
||||
`@ExportMetricWriter` metrics are exported to http://opentsdb.net/[Open TSDB] for
|
||||
aggregation. The `OpenTsdbGaugeWriter` has a `url` property that you need to set
|
||||
`@ExportMetricWriter` metrics are exported to https://github.com/OpenTSDB/opentsdb[Open
|
||||
TSDB] for aggregation. The `OpenTsdbGaugeWriter` has a `url` property that you need to set
|
||||
to the Open TSDB "`/put`" endpoint, e.g. `http://localhost:4242/api/put`). It also has a
|
||||
`namingStrategy` that you can customize or configure to make the metrics match the data
|
||||
structure you need on the server. By default it just passes through the metric name as an
|
||||
@@ -1747,7 +1747,7 @@ include::{code-examples}/cloudfoundry/CloudFoundryIgnorePathsExample.java[tag=se
|
||||
== What to read next
|
||||
If you want to explore some of the concepts discussed in this chapter, you can take a
|
||||
look at the actuator {github-code}/spring-boot-samples[sample applications]. You also
|
||||
might want to read about graphing tools such as http://graphite.wikidot.com/[Graphite].
|
||||
might want to read about graphing tools such as https://graphite.wikidot.com/[Graphite].
|
||||
|
||||
Otherwise, you can continue on, to read about <<deployment.adoc#deployment,
|
||||
'`deployment options`'>> or jump ahead
|
||||
|
||||
@@ -249,7 +249,7 @@ You can use `@DependencyManagementBom` anywhere that you can use `@Grab`, howeve
|
||||
ensure consistent ordering of the dependency management, you can only use
|
||||
`@DependencyManagementBom` at most once in your application. A useful source of
|
||||
dependency management (that is a superset of Spring Boot's dependency management) is the
|
||||
http://platform.spring.io/[Spring IO Platform], e.g.
|
||||
https://platform.spring.io/[Spring IO Platform], e.g.
|
||||
`@DependencyManagementBom('io.spring.platform:platform-bom:1.1.2.RELEASE')`.
|
||||
|
||||
|
||||
@@ -459,7 +459,7 @@ To uninstall all additional dependencies you can use the `--all` option. For exa
|
||||
[[cli-groovy-beans-dsl]]
|
||||
== Developing application with the Groovy beans DSL
|
||||
Spring Framework 4.0 has native support for a `beans{}` "`DSL`" (borrowed from
|
||||
http://grails.org/[Grails]), and you can embed bean definitions in your Groovy
|
||||
https://grails.org/[Grails]), and you can embed bean definitions in your Groovy
|
||||
application scripts using the same format. This is sometimes a good way to include
|
||||
external features like middleware declarations. For example:
|
||||
|
||||
|
||||
@@ -629,10 +629,10 @@ for details.
|
||||
|
||||
[[boot-features-external-config-yaml]]
|
||||
=== Using YAML instead of Properties
|
||||
http://yaml.org[YAML] is a superset of JSON, and as such is a very convenient format
|
||||
https://yaml.org[YAML] is a superset of JSON, and as such is a very convenient format
|
||||
for specifying hierarchical configuration data. The `SpringApplication` class will
|
||||
automatically support YAML as an alternative to properties whenever you have the
|
||||
http://www.snakeyaml.org/[SnakeYAML] library on your classpath.
|
||||
https://bitbucket.org/asomov/snakeyaml[SnakeYAML] library on your classpath.
|
||||
|
||||
NOTE: If you use '`Starters`' SnakeYAML will be automatically provided via
|
||||
`spring-boot-starter`.
|
||||
@@ -651,10 +651,10 @@ For example, the following YAML document:
|
||||
----
|
||||
environments:
|
||||
dev:
|
||||
url: http://dev.bar.com
|
||||
url: https://dev.example.com
|
||||
name: Developer Setup
|
||||
prod:
|
||||
url: http://foo.bar.com
|
||||
url: https://another.example.com
|
||||
name: My Cool App
|
||||
----
|
||||
|
||||
@@ -662,9 +662,9 @@ Would be transformed into these properties:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
environments.dev.url=http://dev.bar.com
|
||||
environments.dev.url=https://dev.example.com
|
||||
environments.dev.name=Developer Setup
|
||||
environments.prod.url=http://foo.bar.com
|
||||
environments.prod.url=https://another.example.com
|
||||
environments.prod.name=My Cool App
|
||||
----
|
||||
|
||||
@@ -675,16 +675,16 @@ for example this YAML:
|
||||
----
|
||||
my:
|
||||
servers:
|
||||
- dev.bar.com
|
||||
- foo.bar.com
|
||||
- dev.example.com
|
||||
- another.example.com
|
||||
----
|
||||
|
||||
Would be transformed into these properties:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
my.servers[0]=dev.bar.com
|
||||
my.servers[1]=foo.bar.com
|
||||
my.servers[0]=dev.example.com
|
||||
my.servers[1]=another.example.com
|
||||
----
|
||||
|
||||
To bind to properties like that using the Spring `DataBinder` utilities (which is what
|
||||
@@ -1328,11 +1328,11 @@ See _<<boot-features-external-config-profile-specific-properties>>_ for details.
|
||||
|
||||
[[boot-features-logging]]
|
||||
== Logging
|
||||
Spring Boot uses http://commons.apache.org/logging[Commons Logging] for all internal
|
||||
Spring Boot uses https://commons.apache.org/logging[Commons Logging] for all internal
|
||||
logging, but leaves the underlying log implementation open. Default configurations are
|
||||
provided for
|
||||
http://docs.oracle.com/javase/7/docs/api/java/util/logging/package-summary.html[Java Util Logging],
|
||||
http://logging.apache.org/log4j/2.x/[Log4J2] and http://logback.qos.ch/[Logback]. In each
|
||||
https://docs.oracle.com/javase/7/docs/api/java/util/logging/package-summary.html[Java Util Logging],
|
||||
https://logging.apache.org/log4j/2.x/[Log4J2] and https://logback.qos.ch/[Logback]. In each
|
||||
case loggers are pre-configured to use console output with optional file output also
|
||||
available.
|
||||
|
||||
@@ -1631,7 +1631,7 @@ it's loaded too early. You need to either use `logback-spring.xml` or define a
|
||||
`logging.config` property.
|
||||
|
||||
WARNING: The extensions cannot be used with Logback's
|
||||
http://logback.qos.ch/manual/configuration.html#autoScan[configuration scanning]. If you
|
||||
https://logback.qos.ch/manual/configuration.html#autoScan[configuration scanning]. If you
|
||||
attempt to do so, making changes to the configuration file will result in an error similar
|
||||
to one of the following being logged:
|
||||
|
||||
@@ -1739,7 +1739,7 @@ Here is a typical example `@RestController` to serve JSON data:
|
||||
|
||||
Spring MVC is part of the core Spring Framework and detailed information is available in
|
||||
the {spring-reference}#mvc[reference documentation]. There are also several guides
|
||||
available at http://spring.io/guides that cover Spring MVC.
|
||||
available at https://spring.io/guides that cover Spring MVC.
|
||||
|
||||
|
||||
|
||||
@@ -1810,7 +1810,7 @@ of converters. You can also override default converters that way.
|
||||
==== Custom JSON Serializers and Deserializers
|
||||
If you're using Jackson to serialize and deserialize JSON data, you might want to write
|
||||
your own `JsonSerializer` and `JsonDeserializer` classes. Custom serializers are usually
|
||||
http://wiki.fasterxml.com/JacksonHowToCustomDeserializers[registered with Jackson via a Module],
|
||||
https://wiki.fasterxml.com/JacksonHowToCustomDeserializers[registered with Jackson via a Module],
|
||||
but Spring Boot provides an alternative `@JsonComponent` annotation which makes it easier
|
||||
to directly register Spring Beans.
|
||||
|
||||
@@ -1890,7 +1890,7 @@ locations. So if there is an `index.html` in any of your locations on startup, i
|
||||
the home page of the application.
|
||||
|
||||
In addition to the '`standard`' static resource locations above, a special case is made
|
||||
for http://www.webjars.org/[Webjars content]. Any resources with a path in `+/webjars/**+`
|
||||
for https://www.webjars.org/[Webjars content]. Any resources with a path in `+/webjars/**+`
|
||||
will be served from jar files if they are packaged in the Webjars format.
|
||||
|
||||
TIP: Do not use the `src/main/webapp` directory if your application will be packaged as a
|
||||
@@ -1981,8 +1981,8 @@ Spring Boot includes auto-configuration support for the following templating eng
|
||||
|
||||
* https://freemarker.apache.org/docs/[FreeMarker]
|
||||
* http://docs.groovy-lang.org/docs/next/html/documentation/template-engines.html#_the_markuptemplateengine[Groovy]
|
||||
* http://www.thymeleaf.org[Thymeleaf]
|
||||
* http://mustache.github.io/[Mustache]
|
||||
* https://www.thymeleaf.org[Thymeleaf]
|
||||
* https://mustache.github.io/[Mustache]
|
||||
|
||||
TIP: JSPs should be avoided if possible, there are several
|
||||
<<boot-features-jsp-limitations, known limitations>> when using them with embedded
|
||||
@@ -2191,9 +2191,9 @@ described above.
|
||||
[[boot-features-cors]]
|
||||
==== CORS support
|
||||
|
||||
http://en.wikipedia.org/wiki/Cross-origin_resource_sharing[Cross-origin resource sharing]
|
||||
(CORS) is a http://www.w3.org/TR/cors/[W3C specification] implemented by
|
||||
http://caniuse.com/#feat=cors[most browsers] that allows you to specify in a flexible
|
||||
https://en.wikipedia.org/wiki/Cross-origin_resource_sharing[Cross-origin resource sharing]
|
||||
(CORS) is a https://www.w3.org/TR/cors/[W3C specification] implemented by
|
||||
https://caniuse.com/#feat=cors[most browsers] that allows you to specify in a flexible
|
||||
way what kind of cross domain requests are authorized, instead of using some less secure
|
||||
and less powerful approaches like IFRAME or JSONP.
|
||||
|
||||
@@ -2830,8 +2830,8 @@ data when your application ends.
|
||||
TIP: The '`How-to`' section includes a _<<howto.adoc#howto-database-initialization,
|
||||
section on how to initialize a database>>_
|
||||
|
||||
Spring Boot can auto-configure embedded http://www.h2database.com[H2],
|
||||
http://hsqldb.org/[HSQL] and http://db.apache.org/derby/[Derby] databases. You don't need
|
||||
Spring Boot can auto-configure embedded https://www.h2database.com[H2],
|
||||
http://hsqldb.org/[HSQL] and https://db.apache.org/derby/[Derby] databases. You don't need
|
||||
to provide any connection URLs, simply include a build dependency to the embedded database
|
||||
that you want to use.
|
||||
|
||||
@@ -2925,7 +2925,7 @@ settings using their respective prefix (`+spring.datasource.tomcat.*+`,
|
||||
documentation of the connection pool implementation you are using for more details.
|
||||
|
||||
For instance, if you are using the
|
||||
http://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html#Common_Attributes[Tomcat connection pool]
|
||||
https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html#Common_Attributes[Tomcat connection pool]
|
||||
you could customize many additional settings:
|
||||
|
||||
|
||||
@@ -3001,9 +3001,9 @@ started. It provides the following key dependencies:
|
||||
* Spring ORMs -- Core ORM support from the Spring Framework.
|
||||
|
||||
TIP: We won't go into too many details of JPA or Spring Data here. You can follow the
|
||||
http://spring.io/guides/gs/accessing-data-jpa/['`Accessing Data with JPA`'] guide from
|
||||
http://spring.io and read the http://projects.spring.io/spring-data-jpa/[Spring Data JPA]
|
||||
and http://hibernate.org/orm/documentation/[Hibernate] reference documentation.
|
||||
https://spring.io/guides/gs/accessing-data-jpa/['`Accessing Data with JPA`'] guide from
|
||||
https://spring.io and read the https://projects.spring.io/spring-data-jpa/[Spring Data JPA]
|
||||
and https://hibernate.org/orm/documentation/[Hibernate] reference documentation.
|
||||
|
||||
|
||||
[NOTE]
|
||||
@@ -3112,7 +3112,7 @@ Here is a typical Spring Data repository:
|
||||
----
|
||||
|
||||
TIP: We have barely scratched the surface of Spring Data JPA. For complete details check
|
||||
their http://projects.spring.io/spring-data-jpa/[reference documentation].
|
||||
their https://projects.spring.io/spring-data-jpa/[reference documentation].
|
||||
|
||||
|
||||
|
||||
@@ -3158,8 +3158,8 @@ views. If you don't want this behavior you should set `spring.jpa.open-in-view`
|
||||
|
||||
[[boot-features-sql-h2-console]]
|
||||
=== Using H2's web console
|
||||
The http://www.h2database.com[H2 database] provides a
|
||||
http://www.h2database.com/html/quickstart.html#h2_console[browser-based console] that
|
||||
The https://www.h2database.com[H2 database] provides a
|
||||
https://www.h2database.com/html/quickstart.html#h2_console[browser-based console] that
|
||||
Spring Boot can auto-configure for you. The console will be auto-configured when the
|
||||
following conditions are met:
|
||||
|
||||
@@ -3197,8 +3197,8 @@ the security configuration:
|
||||
|
||||
[[boot-features-jooq]]
|
||||
=== Using jOOQ
|
||||
Java Object Oriented Querying (http://www.jooq.org/[jOOQ]) is a popular product from
|
||||
http://www.datageekery.com/[Data Geekery] which generates Java code from your
|
||||
Java Object Oriented Querying (https://www.jooq.org/[jOOQ]) is a popular product from
|
||||
https://www.datageekery.com/[Data Geekery] which generates Java code from your
|
||||
database, and lets you build type safe SQL queries through its fluent API. Both the
|
||||
commercial and open source editions can be used with Spring Boot.
|
||||
|
||||
@@ -3307,25 +3307,25 @@ complete control of the jOOQ configuration.
|
||||
== Working with NoSQL technologies
|
||||
Spring Data provides additional projects that help you access a variety of NoSQL
|
||||
technologies including
|
||||
http://projects.spring.io/spring-data-mongodb/[MongoDB],
|
||||
http://projects.spring.io/spring-data-neo4j/[Neo4J],
|
||||
https://projects.spring.io/spring-data-mongodb/[MongoDB],
|
||||
https://projects.spring.io/spring-data-neo4j/[Neo4J],
|
||||
https://github.com/spring-projects/spring-data-elasticsearch/[Elasticsearch],
|
||||
http://projects.spring.io/spring-data-solr/[Solr],
|
||||
http://projects.spring.io/spring-data-redis/[Redis],
|
||||
http://projects.spring.io/spring-data-gemfire/[Gemfire],
|
||||
http://projects.spring.io/spring-data-cassandra/[Cassandra],
|
||||
http://projects.spring.io/spring-data-couchbase/[Couchbase] and
|
||||
http://projects.spring.io/spring-data-ldap/[LDAP].
|
||||
https://projects.spring.io/spring-data-solr/[Solr],
|
||||
https://projects.spring.io/spring-data-redis/[Redis],
|
||||
https://projects.spring.io/spring-data-gemfire/[Gemfire],
|
||||
https://projects.spring.io/spring-data-cassandra/[Cassandra],
|
||||
https://projects.spring.io/spring-data-couchbase/[Couchbase] and
|
||||
https://projects.spring.io/spring-data-ldap/[LDAP].
|
||||
Spring Boot provides auto-configuration for Redis, MongoDB, Neo4j, Elasticsearch, Solr
|
||||
Cassandra, Couchbase and LDAP; you can make use of the other projects, but you will need
|
||||
to configure them yourself. Refer to the appropriate reference documentation at
|
||||
http://projects.spring.io/spring-data[projects.spring.io/spring-data].
|
||||
https://projects.spring.io/spring-data[projects.spring.io/spring-data].
|
||||
|
||||
|
||||
|
||||
[[boot-features-redis]]
|
||||
=== Redis
|
||||
http://redis.io/[Redis] is a cache, message broker and richly-featured key-value store.
|
||||
https://redis.io/[Redis] is a cache, message broker and richly-featured key-value store.
|
||||
Spring Boot offers basic auto-configuration for the
|
||||
https://github.com/xetorthio/jedis/[Jedis] client library and abstractions on top of it
|
||||
provided by https://github.com/spring-projects/spring-data-redis[Spring Data Redis]. There
|
||||
@@ -3366,7 +3366,7 @@ pooled connection factory by default.
|
||||
|
||||
[[boot-features-mongodb]]
|
||||
=== MongoDB
|
||||
http://www.mongodb.com/[MongoDB] is an open-source NoSQL document database that uses a
|
||||
https://www.mongodb.com/[MongoDB] is an open-source NoSQL document database that uses a
|
||||
JSON-like schema instead of traditional table-based relational data. Spring Boot offers
|
||||
several conveniences for working with MongoDB, including the
|
||||
`spring-boot-starter-data-mongodb` '`Starter`'.
|
||||
@@ -3497,7 +3497,7 @@ is now a Mongo data class rather than a JPA `@Entity`, it will work in the same
|
||||
TIP: You can customize document scanning locations using the `@EntityScan` annotation.
|
||||
|
||||
TIP: For complete details of Spring Data MongoDB, including its rich object mapping
|
||||
technologies, refer to their http://projects.spring.io/spring-data-mongodb/[reference
|
||||
technologies, refer to their https://projects.spring.io/spring-data-mongodb/[reference
|
||||
documentation].
|
||||
|
||||
|
||||
@@ -3527,7 +3527,7 @@ Mongo instance's configuration and logging routing.
|
||||
|
||||
[[boot-features-neo4j]]
|
||||
=== Neo4j
|
||||
http://neo4j.com/[Neo4j] is an open-source NoSQL graph database that uses a rich data
|
||||
https://neo4j.com/[Neo4j] is an open-source NoSQL graph database that uses a rich data
|
||||
model of nodes related by first class relationships which is better suited for connected
|
||||
big data than traditional rdbms approaches. Spring Boot offers several conveniences for
|
||||
working with Neo4j, including the `spring-boot-starter-data-neo4j` '`Starter`'.
|
||||
@@ -3647,7 +3647,7 @@ following two annotations to your Spring configuration:
|
||||
----
|
||||
|
||||
TIP: For complete details of Spring Data Neo4j, including its rich object mapping
|
||||
technologies, refer to their http://projects.spring.io/spring-data-neo4j/[reference
|
||||
technologies, refer to their https://projects.spring.io/spring-data-neo4j/[reference
|
||||
documentation].
|
||||
|
||||
|
||||
@@ -3656,7 +3656,7 @@ documentation].
|
||||
=== Gemfire
|
||||
https://github.com/spring-projects/spring-data-gemfire[Spring Data Gemfire] provides
|
||||
convenient Spring-friendly tools for accessing the
|
||||
http://pivotal.io/big-data/pivotal-gemfire#details[Pivotal Gemfire] data management
|
||||
https://pivotal.io/big-data/pivotal-gemfire#details[Pivotal Gemfire] data management
|
||||
platform. There is a `spring-boot-starter-data-gemfire` '`Starter`' for collecting the
|
||||
dependencies in a convenient way. There is currently no auto-configuration support for
|
||||
Gemfire, but you can enable Spring Data Repositories with a
|
||||
@@ -3666,7 +3666,7 @@ https://github.com/spring-projects/spring-data-gemfire/blob/master/src/main/java
|
||||
|
||||
[[boot-features-solr]]
|
||||
=== Solr
|
||||
http://lucene.apache.org/solr/[Apache Solr] is a search engine. Spring Boot offers basic
|
||||
https://lucene.apache.org/solr/[Apache Solr] is a search engine. Spring Boot offers basic
|
||||
auto-configuration for the Solr 5 client library and abstractions on top of it provided by
|
||||
https://github.com/spring-projects/spring-data-solr[Spring Data Solr]. There is
|
||||
a `spring-boot-starter-data-solr` '`Starter`' for collecting the dependencies in a
|
||||
@@ -3711,13 +3711,13 @@ so you could take the JPA example from earlier and, assuming that `City` is now
|
||||
`@SolrDocument` class rather than a JPA `@Entity`, it will work in the same way.
|
||||
|
||||
TIP: For complete details of Spring Data Solr, refer to their
|
||||
http://projects.spring.io/spring-data-solr/[reference documentation].
|
||||
https://projects.spring.io/spring-data-solr/[reference documentation].
|
||||
|
||||
|
||||
|
||||
[[boot-features-elasticsearch]]
|
||||
=== Elasticsearch
|
||||
http://www.elasticsearch.org/[Elasticsearch] is an open source, distributed,
|
||||
https://www.elastic.co/[Elasticsearch] is an open source, distributed,
|
||||
real-time search and analytics engine. Spring Boot offers basic auto-configuration for
|
||||
the Elasticsearch and abstractions on top of it provided by
|
||||
https://github.com/spring-projects/spring-data-elasticsearch[Spring Data Elasticsearch].
|
||||
@@ -3735,7 +3735,7 @@ configured:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
spring.elasticsearch.jest.uris=http://search.example.com:9200
|
||||
spring.elasticsearch.jest.uris=https://search.example.com:9200
|
||||
spring.elasticsearch.jest.read-timeout=10000
|
||||
spring.elasticsearch.jest.username=user
|
||||
spring.elasticsearch.jest.password=secret
|
||||
@@ -3809,13 +3809,13 @@ infrastructure; so you could take the JPA example from earlier and, assuming tha
|
||||
work in the same way.
|
||||
|
||||
TIP: For complete details of Spring Data Elasticsearch, refer to their
|
||||
http://docs.spring.io/spring-data/elasticsearch/docs/[reference documentation].
|
||||
https://docs.spring.io/spring-data/elasticsearch/docs/[reference documentation].
|
||||
|
||||
|
||||
|
||||
[[boot-features-cassandra]]
|
||||
=== Cassandra
|
||||
http://cassandra.apache.org/[Cassandra] is an open source, distributed database management
|
||||
https://cassandra.apache.org/[Cassandra] is an open source, distributed database management
|
||||
system designed to handle large amounts of data across many commodity servers. Spring Boot
|
||||
offers auto-configuration for Cassandra and abstractions on top of it provided by
|
||||
https://github.com/spring-projects/spring-data-cassandra[Spring Data Cassandra].
|
||||
@@ -3866,13 +3866,13 @@ limited than the JPA repositories discussed earlier, and will need to annotate f
|
||||
methods with `@Query`.
|
||||
|
||||
TIP: For complete details of Spring Data Cassandra, refer to their
|
||||
http://docs.spring.io/spring-data/cassandra/docs/[reference documentation].
|
||||
https://docs.spring.io/spring-data/cassandra/docs/[reference documentation].
|
||||
|
||||
|
||||
|
||||
[[boot-features-couchbase]]
|
||||
=== Couchbase
|
||||
http://www.couchbase.com/[Couchbase] is an open-source, distributed multi-model NoSQL
|
||||
https://www.couchbase.com/[Couchbase] is an open-source, distributed multi-model NoSQL
|
||||
document-oriented database that is optimized for interactive applications. Spring Boot
|
||||
offers auto-configuration for Couchbase and abstractions on top of it provided by
|
||||
https://github.com/spring-projects/spring-data-couchbase[Spring Data Couchbase].
|
||||
@@ -3921,7 +3921,7 @@ Check the `spring.couchbase.env.*` properties for more details.
|
||||
==== Spring Data Couchbase repositories
|
||||
Spring Data includes repository support for Couchbase. For complete details of Spring
|
||||
Data Couchbase, refer to their
|
||||
http://docs.spring.io/spring-data/couchbase/docs/current/reference/html/[reference documentation].
|
||||
https://docs.spring.io/spring-data/couchbase/docs/current/reference/html/[reference documentation].
|
||||
|
||||
You can inject an auto-configured `CouchbaseTemplate` instance as you would with any
|
||||
other Spring Bean as long as a _default_ `CouchbaseConfigurer` is available (that
|
||||
@@ -4696,7 +4696,7 @@ RabbitMQ configuration is controlled by external configuration properties in
|
||||
See {sc-spring-boot-autoconfigure}/amqp/RabbitProperties.{sc-ext}[`RabbitProperties`]
|
||||
for more of the supported options.
|
||||
|
||||
TIP: Check http://spring.io/blog/2010/06/14/understanding-amqp-the-protocol-used-by-rabbitmq/[Understanding AMQP, the protocol used by RabbitMQ]
|
||||
TIP: Check https://spring.io/blog/2010/06/14/understanding-amqp-the-protocol-used-by-rabbitmq/[Understanding AMQP, the protocol used by RabbitMQ]
|
||||
for more details.
|
||||
|
||||
|
||||
@@ -5059,7 +5059,7 @@ When a `jndi-name` is set, it takes precedence over all other Session-related se
|
||||
[[boot-features-jta]]
|
||||
== Distributed Transactions with JTA
|
||||
Spring Boot supports distributed JTA transactions across multiple XA resources using
|
||||
either an http://www.atomikos.com/[Atomikos] or https://github.com/bitronix/btm[Bitronix]
|
||||
either an https://www.atomikos.com/[Atomikos] or https://github.com/bitronix/btm[Bitronix]
|
||||
embedded transaction manager. JTA transactions are also supported when deploying to a
|
||||
suitable Java EE Application Server.
|
||||
|
||||
@@ -5231,7 +5231,7 @@ You could also specify the `hazelcast.xml` configuration file to use via configu
|
||||
Otherwise, Spring Boot tries to find the Hazelcast configuration from the default
|
||||
locations, that is `hazelcast.xml` in the working directory or at the root of the
|
||||
classpath. We also check if the `hazelcast.config` system property is set. Check the
|
||||
http://docs.hazelcast.org/docs/latest/manual/html-single/[Hazelcast documentation] for
|
||||
https://docs.hazelcast.org/docs/latest/manual/html-single/[Hazelcast documentation] for
|
||||
more details.
|
||||
|
||||
NOTE: Spring Boot also has an
|
||||
@@ -5317,13 +5317,13 @@ If you use the
|
||||
`spring-boot-starter-test` '`Starter`' (in the `test` `scope`), you will find
|
||||
the following provided libraries:
|
||||
|
||||
* http://junit.org[JUnit] -- The de-facto standard for unit testing Java applications.
|
||||
* https://junit.org[JUnit] -- The de-facto standard for unit testing Java applications.
|
||||
* {spring-reference}/#integration-testing[Spring Test] & Spring Boot Test --
|
||||
Utilities and integration test support for Spring Boot applications.
|
||||
* http://joel-costigliola.github.io/assertj/[AssertJ] -- A fluent assertion library.
|
||||
* http://hamcrest.org/JavaHamcrest/[Hamcrest] -- A library of matcher objects (also known
|
||||
as constraints or predicates).
|
||||
* http://mockito.org/[Mockito] -- A Java mocking framework.
|
||||
* https://joel-costigliola.github.io/assertj/[AssertJ] -- A fluent assertion library.
|
||||
* https://github.com/hamcrest/JavaHamcrest[Hamcrest] -- A library of matcher objects
|
||||
(also known as constraints or predicates).
|
||||
* https://mockito.github.io[Mockito] -- A Java mocking framework.
|
||||
* https://github.com/skyscreamer/JSONassert[JSONassert] -- An assertion library for JSON.
|
||||
* https://github.com/jayway/JsonPath[JsonPath] -- XPath for JSON.
|
||||
|
||||
@@ -6229,7 +6229,7 @@ features will be enabled:
|
||||
@Test
|
||||
public void testRequest() throws Exception {
|
||||
HttpHeaders headers = this.template.getForEntity(
|
||||
"http://myhost.example.com/example", String.class).getHeaders();
|
||||
"https://myhost.example.com/example", String.class).getHeaders();
|
||||
assertThat(headers.getLocation()).hasHost("other.example.com");
|
||||
}
|
||||
|
||||
@@ -6353,7 +6353,7 @@ code by annotating `@Configuration` classes or individual `@Bean` methods.
|
||||
==== Class conditions
|
||||
The `@ConditionalOnClass` and `@ConditionalOnMissingClass` annotations allows
|
||||
configuration to be included based on the presence or absence of specific classes. Due to
|
||||
the fact that annotation metadata is parsed using http://asm.ow2.org/[ASM] you can
|
||||
the fact that annotation metadata is parsed using https://asm.ow2.org/[ASM] you can
|
||||
actually use the `value` attribute to refer to the real class, even though that class
|
||||
might not actually appear on the running application classpath. You can also use the
|
||||
`name` attribute if you prefer to specify the class name using a `String` value.
|
||||
|
||||
@@ -60,10 +60,10 @@ defaults. The parent project provides the following features:
|
||||
omit `<version>` tags for common dependencies, inherited from the
|
||||
`spring-boot-dependencies` POM.
|
||||
* Sensible https://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html[resource filtering].
|
||||
* Sensible plugin configuration (http://www.mojohaus.org/exec-maven-plugin/[exec plugin],
|
||||
http://maven.apache.org/surefire/maven-surefire-plugin/[surefire],
|
||||
* Sensible plugin configuration (https://www.mojohaus.org/exec-maven-plugin/[exec plugin],
|
||||
https://maven.apache.org/surefire/maven-surefire-plugin/[surefire],
|
||||
https://github.com/ktoso/maven-git-commit-id-plugin[Git commit ID],
|
||||
http://maven.apache.org/plugins/maven-shade-plugin/[shade]).
|
||||
https://maven.apache.org/plugins/maven-shade-plugin/[shade]).
|
||||
* Sensible resource filtering for `application.properties` and `application.yml` including
|
||||
profile-specific files (e.g. `application-foo.properties` and `application-foo.yml`)
|
||||
|
||||
@@ -703,8 +703,8 @@ can select `Import...` -> `Existing Maven Projects` from the `File` menu.
|
||||
|
||||
If you can't directly import your project into your IDE, you may be able to generate IDE
|
||||
metadata using a build plugin. Maven includes plugins for
|
||||
http://maven.apache.org/plugins/maven-eclipse-plugin/[Eclipse] and
|
||||
http://maven.apache.org/plugins/maven-idea-plugin/[IDEA]; Gradle offers plugins
|
||||
https://maven.apache.org/plugins/maven-eclipse-plugin/[Eclipse] and
|
||||
https://maven.apache.org/plugins/maven-idea-plugin/[IDEA]; Gradle offers plugins
|
||||
for {gradle-user-guide}/userguide.html[various IDEs].
|
||||
|
||||
TIP: If you accidentally run a web application twice you will see a "`Port already in
|
||||
@@ -778,7 +778,7 @@ You might also want to use this useful operating system environment variable:
|
||||
Since Spring Boot applications are just plain Java applications, JVM hot-swapping should
|
||||
work out of the box. JVM hot swapping is somewhat limited with the bytecode that it can
|
||||
replace, for a more complete solution
|
||||
http://zeroturnaround.com/software/jrebel/[JRebel] or the
|
||||
https://zeroturnaround.com/software/jrebel/[JRebel] or the
|
||||
https://github.com/spring-projects/spring-loaded[Spring Loaded] project can be used. The
|
||||
`spring-boot-devtools` module also includes support for quick application restarts.
|
||||
|
||||
@@ -905,7 +905,7 @@ populated.
|
||||
|
||||
If you find that restarts aren't quick enough for your applications, or you encounter
|
||||
classloading issues, you could consider reloading technologies such as
|
||||
http://zeroturnaround.com/software/jrebel/[JRebel] from ZeroTurnaround. These work by
|
||||
https://zeroturnaround.com/software/jrebel/[JRebel] from ZeroTurnaround. These work by
|
||||
rewriting classes as they are loaded to make them more amenable to reloading.
|
||||
https://github.com/spring-projects/spring-loaded[Spring Loaded] provides another option,
|
||||
however it doesn't support as many frameworks and it isn't commercially supported.
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xslthl="http://xslthl.sf.net"
|
||||
xmlns:xslthl="http://xslthl.sourceforge.net/"
|
||||
xmlns:d="http://docbook.org/ns/docbook"
|
||||
exclude-result-prefixes="xslthl d"
|
||||
version='1.0'>
|
||||
|
||||
@@ -20,7 +20,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xslthl="http://xslthl.sf.net"
|
||||
xmlns:xslthl="http://xslthl.sourceforge.net/"
|
||||
xmlns:d="http://docbook.org/ns/docbook"
|
||||
exclude-result-prefixes="xslthl d"
|
||||
version='1.0'>
|
||||
|
||||
@@ -20,7 +20,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xslthl="http://xslthl.sf.net"
|
||||
xmlns:xslthl="http://xslthl.sourceforge.net/"
|
||||
xmlns:d="http://docbook.org/ns/docbook"
|
||||
exclude-result-prefixes="xslthl"
|
||||
version='1.0'>
|
||||
|
||||
@@ -22,7 +22,7 @@ under the License.
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:d="http://docbook.org/ns/docbook"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
xmlns:xslthl="http://xslthl.sf.net"
|
||||
xmlns:xslthl="http://xslthl.sourceforge.net/"
|
||||
xmlns:xlink='http://www.w3.org/1999/xlink'
|
||||
xmlns:exsl="http://exslt.org/common"
|
||||
exclude-result-prefixes="exsl xslthl d xlink"
|
||||
|
||||
Reference in New Issue
Block a user