fabric8io / fabric8-forge

Supports JBoss Forge plugins for the Fabric8 iPaaS along with using Forge as a REST service inside Fabric8 DevOps
Apache License 2.0
11 stars 21 forks source link

Spring Boot projects could provide a sample REST endpoint #776

Open gastaldi opened 7 years ago

gastaldi commented 7 years ago

It would be nice if a REST endpoint could be provided as a sample when a new project is created using Project:New (when such feature is enabled)

davsclaus commented 7 years ago

What do you mean?

You can add the actuator-web dependency and spring boot comes with /health for health check etc.

jstrachan commented 7 years ago

if you use the spring boot wizard (or start.spring.io) to create a web mvc kinda app, there's no REST endpoint with a sample controller generated. So its kinda sucky for use in demos - after creating the project you have to add a bunch of code to the project to generate a controller.

So I tend to use our microservice quickstart instead - as that comes with a controller: https://github.com/fabric8-quickstarts/spring-boot-webmvc/blob/master/src/main/java/io/fabric8/quickstarts/springbootmvc/HomeController.java

It might be nice to have a Forge wizard option that detects web-mvc and asks if you want a sample controller added