Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

README.md

Speedment Secure REST Example

An example project showcasing how to build a secure REST API with Speedment and Spring Boot.

Usage

Clone the project and build it using Maven.

Set up the database using this SQL code:

create database `securerest`;
use `securerest`;

create table `account` (
    `id` bigint not null auto_increment primary key,
    `username` varchar(30) not null unique,
    `password` char(60) not null,
    `role` enum('USER', 'ADMIN') not null
);

Configure the MySQL username and password in the application.properties-file in case you don't use "root" and "password" as credentials.

Start the application. The following endpoints will be mapped:

  • POST /account
  • GET /account
  • GET /account/{id}

Here are some example cURL-commands that you can try:

Register an Account
curl -X POST "http://localhost:9777/account
    ?username=my_user
    &password=my_pass"
See Information About User #1
curl -X  GET -u my_user:my_pass "http://localhost:9777/account/1"
See Information About All Users
curl -X  GET -u my_user:my_pass "http://localhost:9777/account"

About

An example project showcasing how to build a secure REST API with Speedment and Spring Boot.

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.