Skip to content

Aparna pradhan build issues - #6

Open
AparnaPradhan wants to merge 2 commits into
Infosys:mainfrom
AparnaPradhan:aparna_pradhan_build-issues
Open

Aparna pradhan build issues#6
AparnaPradhan wants to merge 2 commits into
Infosys:mainfrom
AparnaPradhan:aparna_pradhan_build-issues

Conversation

@AparnaPradhan

Copy link
Copy Markdown

Title:
Fix application startup failures: Firebase, Java version, and infrastructure setup

Description:

Summary

  • Make Firebase push notification configuration optional so the app starts without forums-firebase.json
  • Add no-op fallback FireBaseMessagingService when Firebase credentials are not present
  • Document infrastructure prerequisites (PostgreSQL, Keycloak) required to run the application

Changes

Firebase (conditional startup)

  • FireBaseMessagingConfiguration — added @ConditionalOnResource so the Firebase bean is only created when forums-firebase.json exists on the classpath
  • FireBaseMessagingServiceImpl — added @ConditionalOnBean(FirebaseMessaging.class) so it is only registered when Firebase is configured

Summary

  • Make Firebase push notification configuration optional so the app starts without forums-firebase.json
  • Add no-op fallback FireBaseMessagingService when Firebase credentials are not present
  • Document infrastructure prerequisites (PostgreSQL, Keycloak) required to run the application

Changes

Firebase (conditional startup)

  • FireBaseMessagingConfiguration — added @ConditionalOnResource so the Firebase bean is only created when forums-firebase.json exists on the classpath
  • FireBaseMessagingServiceImpl — added @ConditionalOnBean(FirebaseMessaging.class) so it is only registered when Firebase is configured
  • FireBaseMessagingServiceNoOpImpl (new) — no-op fallback that satisfies the FireBaseMessagingService dependency and logs a warning when Firebase is not
    configured

Infrastructure setup

The application requires the following services running before startup:

  • PostgreSQL on localhost:5432 — start with docker compose -f src/main/docker/postgresql.yml up -d
  • Keycloak on localhost:9080 — start with docker compose -f src/main/docker/keycloak.yml up -d
  • Run with mvn spring-boot:run -Denforcer.skip=true if using JDK 15+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants