JavaSpring.libraries.spring-boot.README.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stackgen Show documentation
Show all versions of stackgen Show documentation
Starter StackGen CORE Service Generator
{{^interfaceOnly}}# StackGen generated server
StackGen Spring Boot REST api Server
## Overview
This server was generated by the [StackGen™](https://docs.stackgen.io) project.
Use StackGen™ to generate a REST API Service from a Swagger schema.
This is an example of building a StackGen-enabled server in Java using the SpringBoot framework.
The generated REST service provides:
- A functional interactive REST api Documentation via: [springfox](https://github.com/springfox/springfox)
- A REST service providing CRUD operations for the Data Objects defined in your schema
- A healthcheck endpoint
- Integration with Spring Web Admin and Spring Security
- Default published folder for static files
Start your server as an simple java application using Spring Boot:
```
> java -DadminServiceURL=https://admin.yourco.com:8000 -Dspring.application.name=YOUR-APP -DstarterIgniteSecureKey= -DdbUrl=db.yourco.com -DdbName=StackGen -DdbUser=stackgen -DdbPassword= -DservicePort=8100 -DserviceHost= -DCORSMapping=/** -DCORSOrigins= -jar stackgen-1.0.1-exec.jar &disown
```
After launching, you can view the api documentation in StackGen-ui by pointing to
http://localhost:8100/
Change default port value in application.properties{{/interfaceOnly}}{{#interfaceOnly}}
# StackGen generated API stub
Spring Framework stub
## Overview
This code was generated by the [StackGen™](https://docs.stackgen.io) project.
This is an example of building API Service stub interfaces in Java using the Spring framework.
The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints
by adding ```@Controller``` classes that implement the interface. Eg:
```java
@Controller
public class PetController implements PetApi {
// implement all PetApi methods
}
```
You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg:
```java
@FeignClient(name="pet", url="http://petstore.StackGen.io/v2")
public interface PetClient extends PetApi {
}
```
{{/interfaceOnly}}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy