Skip to content

Commit c1dbe11

Browse files
committed
check wiremock option on templates
1 parent 0eb4407 commit c1dbe11

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/main/resources/handlebars/JavaSpring/libraries/spring-cloud/apiClient.mustache

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import org.springframework.cloud.openfeign.FeignClient;
88
{{/isOpenFeign}}
99
import {{configPackage}}.ClientConfiguration;
1010

11-
{{=<% %>=}}
12-
@FeignClient(<%#isOpenFeign%>contextId="<%classname%>Client", <%/isOpenFeign%>name="${<%title%>.name:<%title%>}", url="${<%title%>.url:<%basePath%>}", configuration = ClientConfiguration.class)
13-
<%={{ }}=%>
11+
@FeignClient({{#isOpenFeign}}contextId="{{classname}}Client", {{/isOpenFeign}}name="${{braces "left"}}{{title}}.name:{{title}}{{braces "right"}}", url="${{braces "left"}}{{title}}.url:{{^wiremock}}{{basePath}}{{/wiremock}}{{#wiremock}}wiremock.base.path{{/wiremock}}{{braces "right"}}", configuration = ClientConfiguration.class)
1412
public interface {{classname}}Client extends {{classname}} {
1513
}

src/main/resources/handlebars/JavaSpring/libraries/spring-cloud/application-test.mustache

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ hystrix.command.default.execution.timeout.enabled: false
99
logging.level.{{apiPackage}}: DEBUG
1010

1111
feign.hystrix.enabled: true
12+
13+
{{#wiremock}}
14+
wiremock.base.path: http://localhost:33333
15+
{{/wiremock}}

src/main/resources/handlebars/JavaSpring/libraries/spring-cloud/pom.mustache

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,13 @@
138138
<artifactId>javax.servlet-api</artifactId>
139139
<scope>provided</scope>
140140
</dependency>
141+
{{#wiremock}}
142+
<dependency>
143+
<groupId>com.github.tomakehurst</groupId>
144+
<artifactId>wiremock</artifactId>
145+
<version>2.27.2</version>
146+
<scope>test</scope>
147+
</dependency>
148+
{{/wiremock}}
141149
</dependencies>
142150
</project>

0 commit comments

Comments
 (0)