FCMSendPush
Firebase Cloud Messaging example
Structure
1 .
2 ├── build.sh
3 ├── pom.xml
4 ├── run.sh
5 ├── src
6 │ └── main
7 │ ├── java
8 │ │ └── hello
9 │ │ ├── Application.java
10 │ │ ├── Data.java
11 │ │ ├── Message.java
12 │ │ ├── Notification.java
13 │ │ ├── PushMessage.java
14 │ │ ├── PushResponse.java
15 │ │ └── SendPushController.java
16 │ └── resources
17 │ ├── application.properties
18 │ ├── logback-spring.xml
19 │ └── templates
20 │ ├── sendpushform.html
21 │ └── sendpush.html
build.sh
run.sh
pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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">
3 <modelVersion>4.0.0</modelVersion>
4 <groupId>hello</groupId>
5 <artifactId>test-spring-boot-push</artifactId>
6 <version>0.1.0</version>
7 <parent>
8 <groupId>org.springframework.boot</groupId>
9 <artifactId>spring-boot-starter-parent</artifactId>
10 <version>2.1.6.RELEASE</version>
11 </parent>
12 <dependencies>
13 <dependency>
14 <groupId>org.springframework.boot</groupId>
15 <artifactId>spring-boot-starter-thymeleaf</artifactId>
16 </dependency>
17 <dependency>
18 <groupId>org.springframework.boot</groupId>
19 <artifactId>spring-boot-starter-web</artifactId>
20 </dependency>
21 <dependency>
22 <groupId>com.google.code.gson</groupId>
23 <artifactId>gson</artifactId>
24 <version>2.8.6</version>
25 <scope>compile</scope>
26 </dependency>
27 </dependencies>
28 <properties>
29 <start-class>hello.Application</start-class>
30 </properties>
31 <build>
32 <plugins>
33 <plugin>
34 <groupId>org.springframework.boot</groupId>
35 <artifactId>spring-boot-maven-plugin</artifactId>
36 </plugin>
37 </plugins>
38 </build>
39 <repositories>
40 <repository>
41 <id>spring-milestone</id>
42 <url>http://repo.spring.io/libs-release</url>
43 </repository>
44 </repositories>
45 <pluginRepositories>
46 <pluginRepository>
47 <id>spring-milestone</id>
48 <url>http://repo.spring.io/libs-release</url>
49 </pluginRepository>
50 </pluginRepositories>
51 </project>
Application.java
Message.java
PushMessage.java
SendPushController.java
Data.java
Notification.java