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
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

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

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

  • Building Enterprise-Ready Landing Zones: Beyond the Initial Setup
  • Streamlining Event Data in Event-Driven Ansible
  • AI Meets Vector Databases: Redefining Data Retrieval in the Age of Intelligence
  • Docker Model Runner: Streamlining AI Deployment for Developers
  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

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: