MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

Revision 3 as of 2021-01-18 16:06:39
  • Java
  • Spring
  • SpringBoot
  • FCMSendPush

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

   1 #!/bin/sh
   2 mvn clean install

run.sh

   1 #!/bin/sh
   2 # /tmp/outpush.log logback-spring.xml
   3 # /tmp/greet.log logback-spring.xml
   4 java -Dfilelog=/tmp/outpush.log -jar target/test-spring-boot-push-0.1.0.jar

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

   1 

Message.java

   1 

PushMessage.java

   1 

SendPushController.java

   1 

Data.java

   1 

Notification.java

   1 

PushResponse.java

   1 
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01