Beapi-io / beapi-java-demo

Java Demo for spring-boot-starter-beapi. This will probably become an SDK so companies can easily implement their own SDK for their backend (at least thats the way I am currently using it)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

alt text

spring-boot-starter-beapi Java Demo

NOTE ☝️ We are now doing hourly builds on this repo and the starter.

Springboot Version - 2.6.2 (or greater)

JVM - 17 (can work on 1.8 but have to change GC)

Configuration - Follow instructions in documentation for installation/configuration

Build - From the shell of the install directory, build for your 'configType' of nano/medium/large (see gradle.properties):

gradle clean build -Pargs=configType=nano

Run - From the shell of the install directory, type:

java -jar build/libs/beapi-java-demo-1.0.jar

Getting a Token -

This will get you your BEARER token to use in your calls/app:

curl -v -H "Content-Type: application/json" -X POST -d '{"username":"admin","password":"@6m!nP@s5"}' http://localhost:8080/authenticate

Calling your API

Then call your api normally:

curl -v -H "Content-Type: application/json" -H "Authorization: Bearer {your_token_here}" --request GET "http://localhost:8080/v{appVersion}/user/show/5"

NOTE: appVersion can be found in your gradle.properties file as 'version'

About

Java Demo for spring-boot-starter-beapi. This will probably become an SDK so companies can easily implement their own SDK for their backend (at least thats the way I am currently using it)


Languages

Language:Groovy 86.3%Language:Java 13.7%