Skip to content

Commit 0a8aa94

Browse files
psevestrePhilippe Sevestre
andauthored
[BAEL-6138] - Receiving Push Notifications in PostreSQL with Spring Integration (eugenp#14467)
* [BAEL-4849] Article code * [BAEL-4968] Article code * [BAEL-4968] Article code * [BAEL-4968] Article code * [BAEL-4968] Remove extra comments * [BAEL-5258] Article Code * [BAEL-2765] PKCE Support for Secret Clients * [BAEL-5698] Article code * [BAEL-5698] Article code * [BAEL-5905] Initial code * [BAEL-5905] Article code * [BAEL-5905] Relocate article code to new module * [BAEL-6275] PostgreSQL NOTIFY/LISTEN * [BAEL-6275] Minor correction * BAEL-6138 * [BAEL-6138] WIP - LiveTest * [BAEL-6138] Tutorial Code * [BAEL-6138] Tutorial Code --------- Co-authored-by: Philippe Sevestre <[email protected]>
1 parent f721927 commit 0a8aa94

File tree

10 files changed

+531
-30
lines changed

10 files changed

+531
-30
lines changed

messaging-modules/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<module>spring-amqp</module>
2323
<module>spring-apache-camel</module>
2424
<module>spring-jms</module>
25-
<module>postgres-notify</module>
25+
<module>postgres-notify</module>
2626
</modules>
2727

2828
</project>

messaging-modules/postgres-notify/pom.xml

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,36 +42,37 @@
4242
<artifactId>lombok</artifactId>
4343
<optional>true</optional>
4444
</dependency>
45-
45+
4646
</dependencies>
4747

48-
<properties>
49-
<java.version>1.8</java.version>
50-
</properties>
51-
<build>
52-
<plugins>
53-
<plugin>
54-
<groupId>org.springframework.boot</groupId>
55-
<artifactId>spring-boot-maven-plugin</artifactId>
56-
</plugin>
57-
</plugins>
58-
</build>
59-
60-
<profiles>
61-
<profile>
62-
<id>instance1</id>
63-
<build>
64-
<plugins>
65-
<plugin>
66-
<groupId>org.springframework.boot</groupId>
67-
<artifactId>spring-boot-maven-plugin</artifactId>
68-
<configuration>
69-
<jvmArguments>-Dserver.port=8081</jvmArguments>
70-
</configuration>
71-
</plugin>
72-
</plugins>
73-
</build>
74-
</profile>
7548

76-
</profiles>
49+
<properties>
50+
<java.version>1.8</java.version>
51+
</properties>
52+
<build>
53+
<plugins>
54+
<plugin>
55+
<groupId>org.springframework.boot</groupId>
56+
<artifactId>spring-boot-maven-plugin</artifactId>
57+
</plugin>
58+
</plugins>
59+
</build>
60+
61+
<profiles>
62+
<profile>
63+
<id>instance1</id>
64+
<build>
65+
<plugins>
66+
<plugin>
67+
<groupId>org.springframework.boot</groupId>
68+
<artifactId>spring-boot-maven-plugin</artifactId>
69+
<configuration>
70+
<jvmArguments>-Dserver.port=8081</jvmArguments>
71+
</configuration>
72+
</plugin>
73+
</plugins>
74+
</build>
75+
</profile>
76+
77+
</profiles>
7778
</project>

spring-integration/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@
9090
<artifactId>jaxb-api</artifactId>
9191
<version>${jaxb-api.version}</version>
9292
</dependency>
93+
<dependency>
94+
<groupId>org.postgresql</groupId>
95+
<artifactId>postgresql</artifactId>
96+
<version>${postgresql.version}</version>
97+
</dependency>
9398
</dependencies>
9499

95100
<build>
@@ -126,6 +131,7 @@
126131
<javax-activation.version>1.1.1</javax-activation.version>
127132
<maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
128133
<jaxb-api.version>2.3.0</jaxb-api.version>
134+
<postgresql.version>42.3.8</postgresql.version>
129135
</properties>
130136

131137
</project>
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
package com.baeldung.domain;
2+
3+
import java.math.BigDecimal;
4+
5+
public class Order {
6+
7+
private Long id;
8+
private String symbol;
9+
private OrderType orderType;
10+
private BigDecimal price;
11+
private BigDecimal quantity;
12+
13+
public Order() {}
14+
15+
public Order(Long id, String symbol, OrderType orderType, BigDecimal price, BigDecimal quantity) {
16+
this.id = id;
17+
this.symbol = symbol;
18+
this.orderType = orderType;
19+
this.price = price;
20+
this.quantity = quantity;
21+
}
22+
23+
/**
24+
* @return the id
25+
*/
26+
public Long getId() {
27+
return id;
28+
}
29+
30+
/**
31+
* @param id the id to set
32+
*/
33+
public void setId(Long id) {
34+
this.id = id;
35+
}
36+
37+
/**
38+
* @return the symbol
39+
*/
40+
public String getSymbol() {
41+
return symbol;
42+
}
43+
44+
/**
45+
* @param symbol the symbol to set
46+
*/
47+
public void setSymbol(String symbol) {
48+
this.symbol = symbol;
49+
}
50+
51+
/**
52+
* @return the orderType
53+
*/
54+
public OrderType getOrderType() {
55+
return orderType;
56+
}
57+
58+
/**
59+
* @param orderType the orderType to set
60+
*/
61+
public void setOrderType(OrderType orderType) {
62+
this.orderType = orderType;
63+
}
64+
65+
/**
66+
* @return the price
67+
*/
68+
public BigDecimal getPrice() {
69+
return price;
70+
}
71+
72+
/**
73+
* @param price the price to set
74+
*/
75+
public void setPrice(BigDecimal price) {
76+
this.price = price;
77+
}
78+
79+
/**
80+
* @return the quantity
81+
*/
82+
public BigDecimal getQuantity() {
83+
return quantity;
84+
}
85+
86+
/**
87+
* @param quantity the quantity to set
88+
*/
89+
public void setQuantity(BigDecimal quantity) {
90+
this.quantity = quantity;
91+
}
92+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.baeldung.domain;
2+
3+
4+
public enum OrderType {
5+
BUY('B'),
6+
SELL('S');
7+
private final char code;
8+
9+
OrderType(char code) {
10+
this.code = code;
11+
}
12+
13+
public char getCode() {
14+
return code;
15+
}
16+
}

0 commit comments

Comments
 (0)