johnykov / micro-infra-scala

micro-infra-spring + scala + slick based on:

Home Page:https://github.com/4finance/micro-infra-spring

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

micro-infra-scala

This project is a simple adaptation of micro-infra-spring into scala. Spring-boot (autowiring) does work nicely with scala. Groovy is not supported here so instead of spock test framework we use scalatest.

This sample web application using:

  •   spring-boot
    
  •   scala
    
  •   micro-infra-spring
    
  •   slick
    

Using gradle as the build tool:

Build using ./gradlew build

Run using: java -jar -DAPP_ENV=dev -Dspring.profiles.active=dev -DCONFIG_FOLDER=/Users/.../properties -Dmicroservice.config.file=classpath:microservice.json build/libs/micro-infra-scala-0.1.0.jar

A url listing the hotels is at http://localhost:8080/hotels


Fire from Intelij Idea with VM options:

    -DAPP_ENV=dev
    -Dspring.profiles.active=dev
    -DCONFIG_FOLDER=/Users/.../properties
    -Dmicroservice.config.file=classpath:microservice.json

For profile=prod you require standalone zookeeper instance.


Handlers from micro-infra-spring

    /api-docs],methods=[GET]
    /api-docs/{swaggerGroup}/{apiDeclaration}],methods=[GET]
    /error]
    /error],produces=[text/html]
    /ping],methods=[GET || HEAD],produces=[text/plain]
    /collaborators],methods=[GET],produces=[application/json]
    /collaborators/all],methods=[GET],produces=[application/json]
    /microservice.json],methods=[GET],produces=[application/json]
    /mappings],methods=[GET]
    /metrics/{name:.*}],methods=[GET]
    /metrics],methods=[GET]
    /env],methods=[POST]
    /env/reset],methods=[POST]
    /dump],methods=[GET]
    /configprops],methods=[GET]
    /pause],methods=[POST]
    /trace],methods=[GET]}
    /health]
    /restart],methods=[POST]}
    /beans],methods=[GET]}
    /info],methods=[GET]
    /autoconfig],methods=[GET]
    /env/{name:.*}],methods=[GET]
    /env],methods=[GET]
    /resume],methods=[POST]
    /refresh],methods=[POST]

Description of above: micro-infra-spring

About

micro-infra-spring + scala + slick based on:

https://github.com/4finance/micro-infra-spring


Languages

Language:Scala 55.5%Language:HTML 44.0%Language:CSS 0.5%