You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/spring-cloud/spring-cloud-tutorial-prepare-app-deployment.md
+52-5Lines changed: 52 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,12 @@ ms.author: brendm
12
12
13
13
This quickstart shows how to prepare an existing Java Spring application for deployment to Azure Spring Cloud. If configured properly, Azure Spring Cloud provides robust services to monitor, scale, and update your Java Spring Cloud application.
14
14
15
+
Other examples explain how to deploy an application to Azure Spring Cloud when the POM file is configured.
16
+
*[Launch App using the Azure portal](spring-cloud-quickstart-launch-app-portal.md)
17
+
*[Launch App using the Azure CLI](spring-cloud-quickstart-launch-app-cli.md)
18
+
19
+
This article explains the required dependencies and how to add them to the POM file.
20
+
15
21
## Java Runtime version
16
22
17
23
Only Spring/Java applications can run in Azure Spring Cloud.
@@ -20,17 +26,19 @@ Azure Spring Cloud supports both Java 8 and Java 11. The hosting environment con
20
26
21
27
## Spring Boot and Spring Cloud versions
22
28
23
-
Azure Spring Cloud supports only Spring Boot apps. It supports both Spring Boot version 2.1 and version 2.2. The following table lists the supported Spring Boot and Spring Cloud combinations:
29
+
To prepare an existing Spring Boot application for deployment to Azure Spring Cloud include the Spring Boot and Spring Cloud dependencies in the application POM file as shown in the following sections.
30
+
31
+
Azure Spring Cloud supports only Spring Boot apps either Spring Boot version 2.1 or version 2.2. The following table lists the supported Spring Boot and Spring Cloud combinations:
24
32
25
33
Spring Boot version | Spring Cloud version
26
34
---|---
27
35
2.1 | Greenwich.RELEASE
28
36
2.2 | Hoxton.RELEASE
29
37
30
-
Verify that your pom.xml file has the correct Spring Boot and Spring Cloud dependencies based on your Spring Boot version.
31
-
32
38
### Dependencies for Spring Boot version 2.1
33
39
40
+
For Spring Boot version 2.1 add the following dependencies to the application POM file.
41
+
34
42
```xml
35
43
<!-- Spring Boot dependencies -->
36
44
<parent>
@@ -55,6 +63,8 @@ Verify that your pom.xml file has the correct Spring Boot and Spring Cloud depen
55
63
56
64
### Dependencies for Spring Boot version 2.2
57
65
66
+
For Spring Boot version 2.2 add the following dependencies to the application POM file.
67
+
58
68
```xml
59
69
<!-- Spring Boot dependencies -->
60
70
<parent>
@@ -79,7 +89,7 @@ Verify that your pom.xml file has the correct Spring Boot and Spring Cloud depen
79
89
80
90
## Azure Spring Cloud client dependency
81
91
82
-
Azure Spring Cloud hosts and manages Spring Cloud components for you. Such components include Spring Cloud Service Registry and Spring Cloud Config Server. Include the Azure Spring Cloud client library in your dependencies to allow communication with your Azure Spring Cloud service instance.
92
+
Azure Spring Cloud hosts and manages Spring Cloud components. The components include Spring Cloud Service Registry and Spring Cloud Config Server. Include the Azure Spring Cloud client library in your dependencies to allow communication with your Azure Spring Cloud service instance.
83
93
84
94
The following table lists the correct Azure Spring Cloud versions for your app that uses Spring Boot and Spring Cloud.
85
95
@@ -92,6 +102,8 @@ Include one of the following dependencies in your pom.xml file. Select the depen
92
102
93
103
### Dependency for Azure Spring Cloud version 2.1
94
104
105
+
For Spring Boot version 2.1 add the following dependency to the application POM file.
106
+
95
107
```xml
96
108
<dependency>
97
109
<groupId>com.microsoft.azure</groupId>
@@ -102,6 +114,8 @@ Include one of the following dependencies in your pom.xml file. Select the depen
102
114
103
115
### Dependency for Azure Spring Cloud version 2.2
104
116
117
+
For Spring Boot version 2.2 add the following dependency to the application POM file.
118
+
105
119
```xml
106
120
<dependency>
107
121
<groupId>com.microsoft.azure</groupId>
@@ -112,7 +126,33 @@ Include one of the following dependencies in your pom.xml file. Select the depen
112
126
113
127
## Other required dependencies
114
128
115
-
To enable the built-in features of Azure Spring Cloud, your application must include the following dependencies. This inclusion ensures that your application configures itself correctly with each component.
129
+
To enable the built-in features of Azure Spring Cloud, your application must include the following dependencies. This inclusion ensures that your application configures itself correctly with each component.
130
+
131
+
### EnableDiscoveryClient annotation
132
+
133
+
Add the following annotation to the application source code.
134
+
```java
135
+
@EnableDiscoveryClient
136
+
```
137
+
For example, see the piggymetrics application from earlier examples:
0 commit comments