DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Spring Boot - How To Use Native SQL Queries | Restful Web Services
  • Develop a Spring Boot REST API in AWS: PART 4 (CodePipeline / CI/CD)
  • RESTful Web Services: How To Create a Context Path for Spring Boot Application or Web Service
  • How To Validate HTTP Post Request Body - Restful Web Services With Spring Framework | Spring Boot

Trending

  • Prioritizing Cloud Security Risks: A Developer's Guide to Tackling Security Debt
  • The Perfection Trap: Rethinking Parkinson's Law for Modern Engineering Teams
  • ITBench, Part 1: Next-Gen Benchmarking for IT Automation Evaluation
  • Driving DevOps With Smart, Scalable Testing
  1. DZone
  2. Coding
  3. Frameworks
  4. Developing Alexa Skills With Spring Boot REST Services in Mind

Developing Alexa Skills With Spring Boot REST Services in Mind

This straightforward article outlines the steps to consider to bring your REST applications to Alexa skills.

By 
Shrisowdhaman Selvaraj user avatar
Shrisowdhaman Selvaraj
·
May. 03, 18 · Tutorial
Likes (8)
Comment
Save
Tweet
Share
15.4K Views

Join the DZone community and get the full member experience.

Join For Free

In this article, I’m going to explain Amazon Alexa integration with your REST application service.

Technology used:

1. Java 1.8

2. Spring Boot 2

3. Alexa Skill Kit SDK – Java

4. Amazon development account (free for one year).

What Will This Application Do With Alexa?

It’s a simple application; it will provide you the information about your policy expiration date. A user has to provide their policy date and date of birth, and Alexa will respond back.

Example:

Scenario 1: Positive Scenario

User: Alexa, Open RedX Insurance.

Alexa: Welcome to RedX Insurance. Do you want to check your policy expiry date?

User: Yes.

Alexa: Please tell me your policy number.

User: A111.

Alexa: Thank you. Please tell me your date of birth.

User: 15 December 2017

Alexa: Policy going to expire on 16-Nov-2018. Thank you.

Scenario 2: Negative Scenario

User: Alexa, open RedX Insurance.

Alexa: Welcome to RedC Insurance. Do you want to check your policy expiry date?

User: Yes.

Alexa: Please tell me your policy number.

User: A111.

Alexa: Thank you. Please tell me your date of birth.

User: 15 December 2017.

Alexa: Sorry, policy not available. Thank you.

Configuration Alexa REST Client and Microservice Sample

Step 1

Download this source from the repository/import it directly into your IDE.

Step 2

Configure a Spring microservice application in your IDE.

File -> Import->Existing Maven Project

Spring 1

Step 3

Configure the Alexa REST Client application in the IDE.

File -> import->Existing Maven Project

Image title

Step 4

We're using a MySQL database, so run this db.sql script.

Alexa REST Client Code Configuration Process

Step 1

Here is the reference application.

Step 2

Get my sample file from my GitHub, and you will see the sample application.

Step 3

Import the Alexa application in Eclipse.

Step 4

Set up the welcome message in the Alexa application:

Image title

AWS Free Account Creation Steps

Step 1

Click here and create a free account.

Image title

Step 2

Pass valid information and click continue.

Image title

Step 3

We're going to use a Professional account type. AWS free accounts are available for the USA region, so please set your country as USA.

ContactUS

Step 4

Click Create Account and continue.

Step 5

You'll need to pass credit card information. They won’t bill you for this step. After one year, they will ask you to select a plan. So, for one year, you can use this account and develop your Alexa projects.

Image title

Step 6

Log into the developer console:

Image title


Step 7

Start an Alexa skill:

Image title

Step 8

Create the skill:

Image title


Step 9

Create a new skill and name it RedXAlexaINsurance:

Image title

Step 10

Select Custom Model to add to your skill:

Image title

Step 11

Invocation name creation:

Image title


Step 12

Create an Intent: policy number.

First, I create the Welcome Info Intent model:

Image title

Image title

Step 13

Then I created my Date of Birth Info Intent.

The Intent slot type is Amazone.Date:

Image title

Source Code : https://github.com/shrisowdhaman/alexa_applicaton/

REST Web Protocols Spring Framework Spring Boot

Opinions expressed by DZone contributors are their own.

Related

  • Spring Boot - How To Use Native SQL Queries | Restful Web Services
  • Develop a Spring Boot REST API in AWS: PART 4 (CodePipeline / CI/CD)
  • RESTful Web Services: How To Create a Context Path for Spring Boot Application or Web Service
  • How To Validate HTTP Post Request Body - Restful Web Services With Spring Framework | Spring Boot

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!