Skip to content

jamesward/hello-spring-salesforce

Repository files navigation

Hello Spring Salesforce

This is a simple Spring Boot application that connects to Salesforce via the REST APIs.

Run on Heroku:

  1. Deploy this app on Heroku: Deploy

  2. Create a new Connected App on Salesforce

  3. Fill in the Connected App Name, API Name, and Contact Email fields

  4. Select Enable OAuth Settings and enter the following Callback URLs:

     https://YOUR_HEROKU_APP_NAME.herokuapp.com/login
     http://localhost:8080/login
    
  5. Select Full access (full) from the list of OAuth Scopes and click Add

  6. Click Save and them Continue to complete the creation of the new Connected App

  7. Manage the settings for your Heroku app (via the Heroku Dashboard) and add SECURITY_OAUTH2_CLIENT_CLIENT_ID and SECURITY_OAUTH2_CLIENT_CLIENT_SECRETconfig vars using the values from the newly created Connected App

  8. Wait about 10 minutes until the OAuth app creation is completed

  9. Check out your your new app

Run Locally:

  1. If you haven't already done so, create a Salesforce Connected App following the instructions above

  2. Create a file in the root project directory named application.properties that contains:

     security.oauth2.client.client-id = YOUR_CONNECTED_APP_CLIENT_ID
     security.oauth2.client.client-secret = YOUR_CONNECTED_APP_CLIENT_SECRET
    

    Note: Make sure you do not put this file in SCM!

  3. Start the local server via Gradle:

    Mac & Linux:

     ./gradlew dev
    

    Windows:

     gradlew dev
    
  4. Check out the app: http://localhost:8080

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published