Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 993 Bytes

README.md

File metadata and controls

56 lines (37 loc) · 993 Bytes

README

A spring microservice that can store and retrieve information on ips using IP2C.

Setup

Database

Using the latest version of docker and docker compose run:

 docker-compose up -d

to setup a docker container with Postgres 12.

To create the tables and seed the database:

cd src/main/resources/init_scripts/1.0
psql -U postgres -d ip2cspring -h 0.0.0.0 # password is 'postgres'

From within the Postgres CLI run:

\i 1.0.sql

Run the application as standalone jar

To run the application run:

./mvnw spring-boot:run 

The application should now have connected to postgres by default.

API

To query information for an ip, for example 46.255.255.254, run:

curl http://localhost:9090/api/info/46.255.255.254

General Info

  1. Framework: Spring v3
  2. Database: PostgreSQL 12
  3. JPA (entity framework): Hibernate
  4. Scheduling: Quartz
  5. Cache: Hazelcast
  6. Build System: maven
  7. Java: Java18