Java Spark Starter

In this edition of Stripe Developer Office Hours, follow along as CJ Avilla walks through the fundamentals of setting up a basic web application with Java Spark.

## Resources

- Spark Framework https://sparkjava.com/
- curl command line tool https://curl.haxx.se/
- java-dotenv https://github.com/cdimascio/dotenv-java
- Stripe Webhooks Guide https://stripe.com/docs/webhooks/build
- Stripe Event Types https://stripe.com/docs/api/events/types
- Code: https://github.com/stripe-samples/developer-office-hours/tree/master/starter/server/java

### Presenter

CJ Avilla, Developer Advocate at Stripe - https://twitter.com/cjav_dev

### Table of contents

00:00 Overview
01:50 Scaffold an HTML page
02:18 Setup the pom.xml file for installing dependencies with Maven
04:20 Create a new Server class
04:50 Make an API call to Stripe to list products
06:10 Setup .env for managing API keys
06:48 Install Java Spark
07:00 Serve static assets
07:36 Add a GET route server-side
09:00 Make GET request client-side
09:52 Add a POST route server-side
11:30 Make a POST request client-side
12:27 Setup a webhook handler
14:16 Recap

### Support

If you have a question, please feel free to reach out to our support team at https://support.stripe.com/ or join us on Discord https://stripe.com/go/developer-chat.

### Updates

Sign up to stay updated with developer news: https://go.stripe.global/dev-digest

### Feedback

If you have any feedback about this or other episodes, let us know: https://forms.gle/VjNqzRhotM2snYo88.
#Stripe #Payments