Skip to content

PinkProgramming/pink-spring

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pink-spring

Checklist

What is SpringBoot?

Spring Boot is a mature, open-source, feature-rich framework.

Generate this project

Generate this initial project with start.spring.io

Basic

After follow: https://spring.io/guides/gs/rest-service/#scratch

Reference code

https://github.com/spring-guides/gs-rest-service/tree/master/complete

Encrypt or decrypt messages API

Let's make this more exciting! Implement one of the algorithms below!

Simple - Caesar cipher

https://en.wikipedia.org/wiki/Caesar_cipher

Medium - Simple Substitution cipher

https://en.wikipedia.org/wiki/Substitution_cipher

More on classical ciphers

https://en.wikipedia.org/wiki/Classical_cipher

Links

http://localhost:8080/greeting http://localhost:8080/greeting?name=Kate http://localhost:8080/cesar?offset=3&text=this%20is%20a%20test

Commands used

Package your jar

mvn package

Run the app

java -jar target/crypto-0.0.1-SNAPSHOT.jar

curl commands for post varsion

  • encode
curl -i \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-X POST --data '{"text": "this is a test", "offset": 3}' "http://localhost:8080/cesar/encode"
  • decode
curl -i \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-X POST --data '{"text": "wklv lv d whvw", "offset": 3}' "http://localhost:8080/cesar/decode"

About

basic api with spring boot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%