Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Build a REST API in Spark!
You have completed Build a REST API in Spark!
Preview
Let's get Spark installed and start working through our REST endpoints. We will explore the Google gson library for JSON serialization.
Gradle dependencies
compile 'com.sparkjava:spark-core:2.3'compile 'com.google.code.gson:gson:2.5'
Learn more
- gson documentation uses private fields instead of getters and setters
- Understanding HATEOAS
- Make your voice heard on our future Java content!
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Let's expose that functionality
to any outside application.
0:00
Whether it be a web app or a mobile app.
0:01
Now first we're gonna need to
get our server up and running.
0:04
So let's get cranking on that.
0:07
All right, so let's get Spark installed.
0:09
So the current version of Spark is 2.3.
0:11
So we're gonna do com.sparkjava and
the name of it is spark-core and
0:17
like I said it's 2.3, awesome.
0:21
We'll update Gradle over here.
0:25
All right, and now right off the root
here let's make a new class and
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up