Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
Add new REST HTTP Client
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoulliard committed Nov 6, 2018
1 parent 5f897ed commit e0f1b02
Show file tree
Hide file tree
Showing 7 changed files with 300 additions and 1 deletion.
2 changes: 2 additions & 0 deletions conf/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ templates:
description: "An application with database connectivity and basic access methods."
- name: rest
description: "A Spring Boot REST Application."
- name: client
description: "A Spring Boot REST Client Application."
- name: custom
description: "A custom application - modules can be added below."
- name: jsp
Expand Down
91 changes: 90 additions & 1 deletion pkg/template/assets_vfsdata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

87 changes: 87 additions & 0 deletions pkg/template/tmpl/client/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>{{.GroupId}}</groupId>
<artifactId>{{.ArtifactId}}</artifactId>
<version>{{.Version}}</version>
<name>Spring Boot - HTTP REST Client</name>
<description>Spring Boot - HTTP REST Client</description>

<properties>
<snowdrop-bom.version>{{.SnowdropBomVersion}}</snowdrop-bom.version>
<spring-boot.version>{{.SpringBootVersion}}</spring-boot.version>
<fabric8-maven-plugin.version>{{.ExtraProperties.FmpVersion}}</fabric8-maven-plugin.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>me.snowdrop</groupId>
<artifactId>spring-boot-bom</artifactId>
<version>${snowdrop-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${fabric8-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration/>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>openshift</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<executions>
<execution>
<id>fmp</id>
<goals>
<goal>resource</goal>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
30 changes: 30 additions & 0 deletions pkg/template/tmpl/client/src/main/java/dummy/Application.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright 2016-2017 Red Hat, Inc, and individual contributors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package {{.PackageName}};

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
* Entry point to the application.
*/
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}

Loading

0 comments on commit e0f1b02

Please sign in to comment.