Skip to content

Simple Spring Boot app with Firebase Cloud Messaging push notifications integration

Notifications You must be signed in to change notification settings

Aramideh/spring-boot-fcm-push-notifications

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot + FCM - simple push notifications server-side application

alt text

This is a forked project from https://github.com/imaginalis/spring-boot-fcm-push-notifications repository, which i decided to add swagger api to have an elegant documentation and also Spring Boot Web Security Configuration enabled so logging in to the swagge ui will require user authentication.

Technologies

  • Spring Boot
  • Firebase Cloud Messaging
  • Swagger Api

Configuration

  • Provide your own Firebase Admin SDK, JSON-formatted file (service account credentials) and place it inside the project (for example src/resources/google)
  • Change the path and defaults in application.properties

PS: FCM Service accont credentials looks like this:

{
  "type": "service_account",
  "project_id": "",
  "private_key_id": "",
  "private_key": "",
  "client_email": "",
  "client_id": "",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": ""
}

Endpoints

List of all endpoints are located in the http://localhost:9090/swagger-ui.html address. if you want to change the 9090 port, modify the application.properties file in the project.

Swagger ui Login Credential

User Name: user

Password: welcome1

alt text

  • Success response

{ "status": 200, "message": "Notification has been sent." }

More information

Authors

Acknowledgments

About

Simple Spring Boot app with Firebase Cloud Messaging push notifications integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Java 99.2%
  • HTML 0.8%