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.
- Spring Boot
- Firebase Cloud Messaging
- Swagger Api
- 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": ""
}
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.
User Name: user
Password: welcome1
- Success response
{ "status": 200, "message": "Notification has been sent." }
-
Blog post: Send push notifications from Spring Boot server-side application using FCM
-
Client-side Ionic application: ionic-fcm-push-notifications
- please refer to Acknowledgments section
- Sadeq Aramideh