Skip to content

Commit ec6aca9

Browse files
felipeazvadamd1985
authored andcommitted
BAEL-781: Explore the new Spring Cloud Gateway (eugenp#2613)
* spring beans DI examples * fix-1: shortening examples * List of Rules Engines in Java * BAEL-812: Openl-Tablets example added * BAEL-812: artifacts names changed * BAEL-812: moving rule-engines examples to rule-engines folder * BAEL-812: removing evaluation article files * BAEL-812: folder renamed * BAEL-812: folder renamed * BAEL-812: pom.xml - parent added * BAEL-1027: Introduction to GraphQL - initial commit * BAEL-781: Explore the new Spring Cloud Gateway * BAEL-781: Fix UserService.java * BAEL-781: Fix user-service pom.xml * BAEL-781: remove eureka-server from the example * BAEL-781: modifying example
1 parent 1ddd46f commit ec6aca9

6 files changed

Lines changed: 157 additions & 0 deletions

File tree

‎spring-cloud/pom.xml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<module>spring-cloud-ribbon-client</module>
1616
<module>spring-cloud-rest</module>
1717
<module>spring-cloud-zookeeper</module>
18+
<module>spring-cloud-gateway</module>
1819
</modules>
1920
<packaging>pom</packaging>
2021

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
### Relevant Articles:
2+
- [Explore the new Spring Cloud Gateway](http://www.baeldung.com/spring-cloud-gateway)
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<artifactId>gateway-service</artifactId>
6+
<version>1.0.0-SNAPSHOT</version>
7+
<packaging>jar</packaging>
8+
9+
<name>Spring Cloud Gateway Service</name>
10+
11+
<parent>
12+
<groupId>com.baeldung.spring.cloud</groupId>
13+
<artifactId>spring-cloud-gateway</artifactId>
14+
<version>1.0.0-SNAPSHOT</version>
15+
<relativePath>..</relativePath>
16+
</parent>
17+
18+
<properties>
19+
<version>2.0.0.M2</version>
20+
</properties>
21+
22+
<dependencies>
23+
<dependency>
24+
<groupId>org.springframework.boot</groupId>
25+
<artifactId>spring-boot-actuator</artifactId>
26+
<version>${version}</version>
27+
</dependency>
28+
<dependency>
29+
<groupId>org.springframework.boot</groupId>
30+
<artifactId>spring-boot-starter-webflux</artifactId>
31+
<version>${version}</version>
32+
</dependency>
33+
<dependency>
34+
<groupId>org.springframework.cloud</groupId>
35+
<artifactId>spring-cloud-gateway-core</artifactId>
36+
<version>${version}</version>
37+
</dependency>
38+
<dependency>
39+
<groupId>org.springframework.cloud</groupId>
40+
<artifactId>spring-cloud-starter-eureka</artifactId>
41+
<version>${version}</version>
42+
</dependency>
43+
<dependency>
44+
<groupId>org.hibernate</groupId>
45+
<artifactId>hibernate-validator-cdi</artifactId>
46+
<version>6.0.2.Final</version>
47+
</dependency>
48+
<dependency>
49+
<groupId>javax.validation</groupId>
50+
<artifactId>validation-api</artifactId>
51+
<version>2.0.0.Final</version>
52+
</dependency>
53+
<dependency>
54+
<groupId>io.projectreactor.ipc</groupId>
55+
<artifactId>reactor-netty</artifactId>
56+
<version>0.7.0.M1</version>
57+
</dependency>
58+
</dependencies>
59+
60+
<repositories>
61+
<repository>
62+
<id>spring-snapshots</id>
63+
<name>Spring Snapshots</name>
64+
<url>https://repo.spring.io/snapshot</url>
65+
<snapshots>
66+
<enabled>true</enabled>
67+
</snapshots>
68+
</repository>
69+
<repository>
70+
<id>spring-milestones</id>
71+
<name>Spring Milestones</name>
72+
<url>https://repo.spring.io/milestone</url>
73+
<snapshots>
74+
<enabled>false</enabled>
75+
</snapshots>
76+
</repository>
77+
</repositories>
78+
79+
</project>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.baeldung.spring.cloud;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
@SpringBootApplication
7+
public class GatewayApplication {
8+
9+
public static void main(String[] args) {
10+
SpringApplication.run(GatewayApplication.class, args);
11+
}
12+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
server:
2+
port: 80
3+
spring:
4+
cloud:
5+
gateway:
6+
routes:
7+
- id: baeldung_route
8+
uri: http://www.baeldung.com
9+
predicates:
10+
- Path=/baeldung
11+
management:
12+
security:
13+
enabled: false
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.baeldung.spring.cloud</groupId>
8+
<artifactId>spring-cloud-gateway</artifactId>
9+
<version>1.0.0-SNAPSHOT</version>
10+
<modules>
11+
<module>gateway-service</module>
12+
</modules>
13+
<packaging>pom</packaging>
14+
15+
<name>Spring Cloud Gateway</name>
16+
17+
<parent>
18+
<groupId>com.baeldung.spring.cloud</groupId>
19+
<artifactId>spring-cloud</artifactId>
20+
<version>1.0.0-SNAPSHOT</version>
21+
<relativePath>..</relativePath>
22+
</parent>
23+
24+
<properties>
25+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
26+
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
27+
<spring-boot-maven-plugin.version>1.4.2.RELEASE</spring-boot-maven-plugin.version>
28+
</properties>
29+
30+
<build>
31+
<pluginManagement>
32+
<plugins>
33+
<plugin>
34+
<groupId>org.apache.maven.plugins</groupId>
35+
<artifactId>maven-compiler-plugin</artifactId>
36+
<version>${maven-compiler-plugin.version}</version>
37+
<configuration>
38+
<source>1.8</source>
39+
<target>1.8</target>
40+
</configuration>
41+
</plugin>
42+
<plugin>
43+
<groupId>org.springframework.boot</groupId>
44+
<artifactId>spring-boot-maven-plugin</artifactId>
45+
<version>${spring-boot-maven-plugin.version}</version>
46+
</plugin>
47+
</plugins>
48+
</pluginManagement>
49+
</build>
50+
</project>

0 commit comments

Comments
 (0)