├── .editorconfig
├── .gitattributes
├── .gitignore
├── .jshintrc
├── .travis.yml
├── LICENSE
├── README.md
├── app
├── index.js
└── templates
│ ├── Application.java
│ ├── application.yml
│ ├── build.gradle
│ └── pom.xml
├── hateoas
├── index.js
└── templates
│ ├── Controller.java
│ └── Representation.java
├── logo
└── Gen-Spring-Logo.jpg
├── package.json
├── rest
├── index.js
└── templates
│ ├── Controller.java
│ └── Representation.java
├── route
├── index.js
└── templates
│ ├── Controller.java
│ └── view.html
└── test
└── test-load.js
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | temp/
3 | .idea
4 | *.iml
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": true,
3 | "esnext": true,
4 | "bitwise": true,
5 | "camelcase": true,
6 | "curly": true,
7 | "eqeqeq": true,
8 | "immed": true,
9 | "indent": 4,
10 | "latedef": true,
11 | "newcap": true,
12 | "noarg": true,
13 | "quotmark": "single",
14 | "regexp": true,
15 | "undef": true,
16 | "unused": true,
17 | "strict": true,
18 | "trailing": true,
19 | "smarttabs": true,
20 | "white": true
21 | }
22 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - '6.5.0'
4 | - '6.9.0'
5 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Tomas Lin
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # generator-spring [](https://travis-ci.org/davetownsend/generator-spring)
4 |
5 | A [Yeoman](http://yeoman.io) generator for scaffolding and bootstrapping [Spring Boot](http://projects.spring.io/spring-boot/) and [Spring Cloud](http://projects.spring.io/spring-cloud/) applications. Provides the same selectable options as [Spring Initializr](http://start.spring.io), but with and interactive CLI interface so your hands can stay where they belong, on the keyboard!
6 |
7 |
8 | ## Getting Started
9 |
10 | **Install Yeoman**
11 |
12 | ```
13 | $ npm install -g yo
14 | ```
15 |
16 | **Install generator-spring**
17 |
18 | ```
19 | $ npm install -g generator-spring
20 | ```
21 |
22 | **Initiate spring-generator!**
23 |
24 | ```
25 | $ yo spring
26 | ```
27 | _The interactive CLI menu will guide the way._
28 |
29 |
30 | ### Extras (Sub-generators)
31 | Creates a REST endpoint
32 |
33 | ```
34 | $ yo spring:rest
35 | ```
36 |
37 | Creates a REST endpoint with HATEOAS support *(has dependency on choosing the hateoas starter option)*
38 |
39 | ```
40 | $ yo spring:hateoas
41 | ```
42 |
43 | Creates an initial Thymeleaf view *(has dependency on choosing the Thyemleaf starter option)*
44 |
45 | ```
46 | $ yo spring:route
47 | ```
48 |
49 | ## TODO
50 | - Add the new Spring Cloud libs supported with Spring Boot 1.5.x
51 | - Add support for createing a serverless (AWS) project with Spring Cloud Function.
52 | - Add React support. This will essentially scaffold an opinionated react SPA (webpack/es6/material-ui) as the front end.
53 |
54 | ## License
55 |
56 | [MIT License](http://en.wikipedia.org/wiki/MIT_License)
57 |
--------------------------------------------------------------------------------
/app/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | var util = require('util');
3 | var path = require('path');
4 | var yeoman = require('yeoman-generator');
5 | var chalk = require('chalk');
6 | var mkdirp = require('mkdirp');
7 |
8 | var SpringGenerator = module.exports = function SpringGenerator(args, options, config) {
9 | yeoman.generators.Base.apply(this, arguments);
10 | };
11 |
12 | util.inherits(SpringGenerator, yeoman.generators.Base);
13 |
14 | SpringGenerator.prototype.askFor = function askFor() {
15 | var cb = this.async();
16 |
17 | console.log(chalk.green('\n.............DD88888888888888888,............\n' +
18 | '...........:888888888888888888888,...........\n' +
19 | '..........+88888888888888888888888+..........\n' +
20 | '.........,8888888888888888888888888..........\n' +
21 | '.........888888888888...888888888888.........\n' +
22 | '.......,88888887..D88...88Z..88888888,.......\n' +
23 | '.......8888888,...888...88D...=8888888.......\n' +
24 | '......D888888,..$8888...88887...8888888......\n' +
25 | '.....Z888888$..I88888...88888:..88888888,....\n' +
26 | '....D8888888...888888...88888D..,88888888....\n' +
27 | '....88888888,..888888..,888888...88888888....\n' +
28 | '....88888888,..8888888$888888D..,88888888....\n' +
29 | '....88888888I..Z8888888888888+..888888888....\n' +
30 | '.....Z8888888...O888888888888..,88888888.....\n' +
31 | '......88888888...,88888888D...,88888888......\n' +
32 | '.......88888888=.....?I+.....I88888888.......\n' +
33 | '.......,88888888D7.........ZD88888888,.......\n' +
34 | '.........888888888888888888888888888.........\n' +
35 | '.........,8888888888888888888888888..........\n' +
36 | '..........+88888888888888888888888+..........\n' +
37 | '...........,888888888888888888888:...........\n' +
38 | '.............DD888888888888888DD.............\n' +
39 | chalk.yellow('\nWelcome to the Spring Boot Generator\n\nLets get started!\n\n')));
40 |
41 |
42 | var prompts = [
43 | {
44 | type: 'string',
45 | name: 'bootVersion',
46 | message: 'Enter Spring Boot version:',
47 | default: '1.4.1.RELEASE'
48 | }, {
49 | type: 'string',
50 | name: 'packageName',
51 | message: 'Enter default package name:',
52 | default: 'com.myapp'
53 | }, {
54 | type: 'string',
55 | name: 'baseName',
56 | message: 'Enter base name of app:',
57 | default: 'app'
58 | }, {
59 | type: 'string',
60 | name: 'javaVersion',
61 | message: 'Enter Java version:',
62 | default: '1.8'
63 | }, {
64 | type: 'checkbox',
65 | name: 'packagingType',
66 | message: 'Package type:',
67 | choices: [
68 | {
69 | name: 'Jar',
70 | value: 'jar'
71 | }, {
72 | name: 'War',
73 | value: 'war'
74 | }
75 | ]
76 | }, {
77 | type: 'checkbox',
78 | name: 'buildTool',
79 | message: 'Select build tool:',
80 | choices: [
81 | {
82 | name: 'Gradle',
83 | value: 'gradle'
84 | }, {
85 | name: 'Maven',
86 | value: 'maven'
87 | }
88 | ]
89 | }, {
90 | type: 'checkbox',
91 | name: 'coreWeb',
92 | message: 'Select Core/Web Dependencies:',
93 | choices: [
94 | {
95 | name: 'Web',
96 | value: 'web'
97 | }, {
98 | name: 'Jetty (Tomcat will be uninstalled)',
99 | value: 'jetty'
100 | }, {
101 | name: 'Security',
102 | value: 'security'
103 | }, {
104 | name: 'AOP',
105 | value: 'aop'
106 | }, {
107 | name: 'Websocket',
108 | value: 'websocket'
109 | }, {
110 | name: 'Jersey (JAX-RS)',
111 | value: 'jersey'
112 | }, {
113 | name: 'Rest Repositories',
114 | value: 'rest'
115 | }, {
116 | name: 'Hypermedia (HATEOAS)',
117 | value: 'hateoas'
118 | }, {
119 | name: 'Mobile',
120 | value: 'mobile'
121 | }, {
122 | name: 'REST Docs',
123 | value: 'restdocs'
124 | }
125 | ]
126 | }, {
127 | type: 'checkbox',
128 | name: 'templates',
129 | message: 'Select Template Engine:',
130 | choices: [
131 | {
132 | name: 'Thymeleaf',
133 | value: 'thymeleaf'
134 | }, {
135 | name: 'Groovy Templates',
136 | value: 'gtemplates'
137 | }, {
138 | name: 'Mustache',
139 | value: 'mustache'
140 | }
141 | ]
142 | }, {
143 | type: 'checkbox',
144 | name: 'data',
145 | message: 'Select Data support:',
146 | choices: [
147 | {
148 | name: 'Jdbc',
149 | value: 'jdbc'
150 | }, {
151 | name: 'JPA',
152 | value: 'jpa'
153 | }, {
154 | name: 'MongoDB',
155 | value: 'mongodb'
156 | }, {
157 | name: 'Redis',
158 | value: 'redis'
159 | }, {
160 | name: 'Solr',
161 | value: 'solr'
162 | }, {
163 | name: 'Elasticsearch',
164 | value: 'elasticsearch'
165 | }
166 | ]
167 | }, {
168 | type: 'checkbox',
169 | name: 'database',
170 | message: 'Select Database support:',
171 | choices: [
172 | {
173 | name: 'H2',
174 | value: 'h2'
175 | }, {
176 | name: 'HSQLDB',
177 | value: 'hsqldb'
178 | }, {
179 | name: 'Apache Derby',
180 | value: 'derby'
181 | }, {
182 | name: 'MySQL',
183 | value: 'mysql'
184 | }, {
185 | name: 'PostgreSQL',
186 | value: 'postgresql'
187 | }
188 | ]
189 | }, {
190 | type: 'checkbox',
191 | name: 'cloud',
192 | message: 'Select Spring Cloud support:',
193 | choices: [
194 | {
195 | name: 'Cloud Connectors',
196 | value: 'connectors'
197 | }, {
198 | name: 'Cloud Bootstrap',
199 | value: 'bootstrap'
200 | }, {
201 | name: 'Config Client',
202 | value: 'configClient'
203 | }, {
204 | name: 'Config Server',
205 | value: 'configServer'
206 | }, {
207 | name: 'Eureka',
208 | value: 'eureka'
209 | }, {
210 | name: 'Eureka Server',
211 | value: 'eurekaServer'
212 | }, {
213 | name: 'Feign',
214 | value: 'feign'
215 | }, {
216 | name: 'Hystrix',
217 | value: 'hystrix'
218 | }, {
219 | name: 'Hystrix Dashboard',
220 | value: 'hystrixDashboard'
221 | }, {
222 | name: 'OAuth2',
223 | value: 'oauth2'
224 | }, {
225 | name: 'Ribbon',
226 | value: 'ribbon'
227 | }, {
228 | name: 'Turbine',
229 | value: 'turbine'
230 | }, {
231 | name: 'Turbine AMQP',
232 | value: 'turbineAmqp'
233 | }, {
234 | name: 'Zuul',
235 | value: 'zuul'
236 | }, {
237 | name: 'AWS',
238 | value: 'aws'
239 | }, {
240 | name: 'AWS JDBC',
241 | value: 'awsJdbc'
242 | }, {
243 | name: 'AWS Messaging',
244 | value: 'awsMessaging'
245 | }, {
246 | name: 'Cloud Bus AMQP',
247 | value: 'cloudBus'
248 | }, {
249 | name: 'Cloud Security',
250 | value: 'cloudSecurity'
251 | }
252 | ]
253 | }, {
254 | type: 'checkbox',
255 | name: 'io',
256 | message: 'Select I/O support:',
257 | choices: [
258 | {
259 | name: 'Batch',
260 | value: 'batch'
261 | }, {
262 | name: 'Integration',
263 | value: 'integration'
264 | }, {
265 | name: 'JMS (HornetQ)',
266 | value: 'jms'
267 | }, {
268 | name: 'AMQP',
269 | value: 'amqp'
270 | }, {
271 | name: 'Mail',
272 | value: 'mail'
273 | }
274 | ]
275 | }, {
276 | type: 'checkbox',
277 | name: 'social',
278 | message: 'Select Social APIs:',
279 | choices: [
280 | {
281 | name: 'Facebook',
282 | value: 'facebook'
283 | }, {
284 | name: 'LinkedIn',
285 | value: 'linkedin'
286 | }, {
287 | name: 'Twitter',
288 | value: 'twitter'
289 | }
290 | ]
291 | }, {
292 | type: 'checkbox',
293 | name: 'ops',
294 | message: 'Select OPS tools:',
295 | choices: [
296 | {
297 | name: 'Actuator',
298 | value: 'actuator'
299 | }, {
300 | name: 'Remote Shell',
301 | value: 'remoteshell'
302 | }
303 | ]
304 | }, {
305 | type: 'confirm',
306 | name: 'useSpock',
307 | message: 'Use Spock?',
308 | default: true
309 | }, {
310 | type: 'string',
311 | name: 'groovyVersion',
312 | message: 'Enter Groovy version:',
313 | default: '2.4.4'
314 | }
315 | ];
316 |
317 | this.prompt(prompts, function(props) {
318 | this.bootVersion = props.bootVersion;
319 | this.packageName = props.packageName;
320 | this.baseName = props.baseName;
321 | this.javaVersion = props.javaVersion;
322 | this.packagingType = props.packagingType;
323 | this.coreWeb = props.coreWeb;
324 | this.templates = props.templates;
325 | this.data = props.data;
326 | this.database = props.database;
327 | this.cloud = props.cloud;
328 | this.io = props.io;
329 | this.social = props.social;
330 | this.ops = props.ops;
331 | this.useSpock = props.useSpock;
332 | this.groovyVersion = props.groovyVersion;
333 | this.buildTool = props.buildTool;
334 |
335 | // Packaging Type
336 | var hasPackagingType = function(packagingTypeStarter) {
337 | return props.packagingType.indexOf(packagingTypeStarter) !== -1;
338 | };
339 | this.jar = hasPackagingType('jar');
340 | this.war = hasPackagingType('war');
341 |
342 | // Core/Web
343 | var hasCoreWeb = function(coreWebStarter) {
344 | return props.coreWeb.indexOf(coreWebStarter) !== -1;
345 | };
346 | this.web = hasCoreWeb('web');
347 | this.jetty = hasCoreWeb('jetty');
348 | this.security = hasCoreWeb('security');
349 | this.aop = hasCoreWeb('aop');
350 | this.websocket = hasCoreWeb('websocket');
351 | this.jersey = hasCoreWeb('jersey');
352 | this.rest = hasCoreWeb('rest');
353 | this.hateoas = hasCoreWeb('hateoas');
354 | this.mobile = hasCoreWeb('mobile');
355 | this.restdocs = hasCoreWeb('restdocs');
356 |
357 | // Template Engines
358 | var hasTemplate = function(templateStarter) {
359 | return props.templates.indexOf(templateStarter) !== -1;
360 | };
361 | this.thymeleaf = hasTemplate('thymeleaf');
362 | this.gtemplates = hasTemplate('gtemplates');
363 | this.mustache = hasTemplate('mustache');
364 |
365 | // Spring Data
366 | var hasData = function(dataStarter) {
367 | return props.data.indexOf(dataStarter) !== -1;
368 | };
369 | this.jdbc = hasData('jdbc');
370 | this.jpa = hasData('jpa');
371 | this.mongodb = hasData('mongodb');
372 | this.redis = hasData('redis');
373 | this.gemfire = hasData('gemfire');
374 | this.solr = hasData('solr');
375 | this.elasticsearch = hasData('elasticsearch');
376 |
377 | // Databases
378 | var hasDatabase = function(databaseStarter) {
379 | return props.database.indexOf(databaseStarter) !== -1;
380 | };
381 | this.h2 = hasDatabase('h2');
382 | this.hsqldb = hasDatabase('hsqldb');
383 | this.derby = hasDatabase('derby');
384 | this.mysql = hasDatabase('mysql');
385 | this.postgresql = hasDatabase('postgresql');
386 |
387 | // Spring Cloud
388 | prompts.push({
389 | type: 'string',
390 | name: 'usesCloud',
391 | message: 'usesCloud',
392 | default: false
393 | });
394 | var hasCloud = function(cloudStarter) {
395 | return props.cloud.indexOf(cloudStarter) !== -1;
396 | };
397 | this.connectors = hasCloud('connectors');
398 | this.bootstrap = hasCloud('bootstrap');
399 | this.configClient = hasCloud('configClient');
400 | this.configServer = hasCloud('configServer');
401 | this.eureka = hasCloud('eureka');
402 | this.eurekaServer = hasCloud('eurekaServer');
403 | this.feign = hasCloud('feign');
404 | this.hystrix = hasCloud('hystrix');
405 | this.hystrixDashboard = hasCloud('hystrixDashboard');
406 | this.oauth2 = hasCloud('oauth2');
407 | this.ribbon = hasCloud('ribbon');
408 | this.turbine = hasCloud('turbine');
409 | this.turbineAmqp = hasCloud('turbineAmqp');
410 | this.zuul = hasCloud('zuul');
411 | this.aws = hasCloud('aws');
412 | this.awsJdbc = hasCloud('awsJdbc');
413 | this.awsMessaging = hasCloud('awsMessaging');
414 | this.cloudBus = hasCloud('cloudBus');
415 | this.cloudSecurity = hasCloud('cloudSecurity');
416 | this.usesCloud = props.cloud.length > 0;
417 |
418 | // I/O
419 | var hasIO = function(ioStarter) {
420 | return props.io.indexOf(ioStarter) !== -1;
421 | };
422 | this.batch = hasIO('batch');
423 | this.integration = hasIO('integration');
424 | this.jms = hasIO('jms');
425 | this.amqp = hasIO('amqp');
426 | this.mail = hasIO('mail');
427 |
428 | // Social
429 | var hasSocial = function(socialStarter) {
430 | return props.social.indexOf(socialStarter) !== -1;
431 | };
432 | this.facebook = hasSocial('facebook');
433 | this.linkedin = hasSocial('linkedin');
434 | this.twitter = hasSocial('twitter');
435 |
436 | // OPS
437 | var hasOps = function(opsStarter) {
438 | return props.ops.indexOf(opsStarter) !== -1;
439 | };
440 | this.actuator = hasOps('actuator');
441 | this.remoteshell = hasOps('remoteshell');
442 |
443 | cb();
444 | }.bind(this));
445 | };
446 |
447 | SpringGenerator.prototype.app = function app() {
448 | var packageFolder = this.packageName.replace(/\./g, '/');
449 | var srcDir = 'src/main/java/' + packageFolder;
450 | var resourceDir = 'src/main/resources';
451 | mkdirp(srcDir);
452 |
453 | if ('gradle' === this.buildTool[0]) {
454 | this.template('build.gradle', 'build.gradle');
455 | }
456 | if ('maven' === this.buildTool[0]) {
457 | this.template('pom.xml', 'pom.xml');
458 | }
459 |
460 | this.template('Application.java', srcDir + '/Application.java');
461 |
462 | if (this.useSpock) {
463 | var testDir = 'src/test/groovy/' + packageFolder;
464 | mkdirp(testDir);
465 | }
466 | if (this.web || this.thymeleaf || this.gtemplates || this.mustache) {
467 | mkdirp('src/main/resources');
468 | mkdirp('src/main/resources/static');
469 | mkdirp('src/main/resources/templates');
470 | this.template('application.yml', resourceDir + '/application.yml');
471 | }
472 | this.config.set('packageName', this.packageName);
473 | this.config.set('packageFolder', packageFolder);
474 | };
475 |
476 | SpringGenerator.prototype.projectfiles = function projectfiles() {};
477 |
--------------------------------------------------------------------------------
/app/templates/Application.java:
--------------------------------------------------------------------------------
1 | package <%=packageName%>;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app/templates/application.yml:
--------------------------------------------------------------------------------
1 | info:
2 | version: 0.0.1
3 |
4 | spring:
5 | application:
6 | name: <%= baseName %>
7 |
--------------------------------------------------------------------------------
/app/templates/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | mavenCentral()
4 | maven { url "https://repo.spring.io/snapshot" }
5 | maven { url "https://repo.spring.io/milestone" }
6 | }
7 | dependencies {
8 | classpath("org.springframework.boot:spring-boot-gradle-plugin:<%= bootVersion %>")
9 | }
10 | }
11 | <% if (war) { %>apply plugin: 'war'<% } %>
12 | apply plugin: 'java'
13 | apply plugin: 'eclipse'
14 | apply plugin: 'idea'
15 | apply plugin: 'spring-boot'
16 |
17 | sourceCompatibility = '<%= javaVersion %>'
18 | targetCompatibility = '<%= javaVersion %>'
19 |
20 | repositories {
21 | mavenCentral()
22 | maven { url "https://repo.spring.io/snapshot" }
23 | maven { url "https://repo.spring.io/milestone" }
24 | }
25 |
26 | dependencies {
27 | <% if (web) { %>compile("org.springframework.boot:spring-boot-starter-web")<% if (jetty) { %> {
28 | exclude module: "spring-boot-starter-tomcat"
29 | }
30 | compile("org.springframework.boot:spring-boot-starter-jetty")<% } %>
31 | <% } %>
32 | <% if (security) { %>compile("org.springframework.boot:spring-boot-starter-security")<% } %>
33 | <% if (aop) { %>compile("org.springframework.boot:spring-boot-starter-aop")<% } %>
34 | <% if (websocket) { %>compile("org.springframework.boot:spring-boot-starter-websocket")<% } %>
35 | <% if (jersey) { %>compile("org.springframework.boot:spring-boot-starter-jersey")<% } %>
36 | <% if (rest) { %>compile("org.springframework.boot:spring-boot-starter-data-rest")<% } %>
37 | <% if (hateoas) { %>compile("org.springframework.boot:spring-boot-starter-hateoas")<% } %>
38 | <% if (mobile) { %>compile("org.springframework.boot:spring-boot-starter-mobile")<% } %>
39 | <% if (restdocs) { %>compile("org.springframework.restdocs:spring-restdocs-mockmvc:1.0.0.RELEASE")<% } %>
40 |
41 | <% if (thymeleaf) { %>compile("org.springframework.boot:spring-boot-starter-thymeleaf")<% } %>
42 | <% if (gtemplates) { %>compile("org.springframework.boot:spring-boot-starter-groovy-templates")<% } %>
43 | <% if (mustache) { %>compile("org.springframework.boot:spring-boot-starter-mustache")<% } %>
44 |
45 | <% if (jdbc) { %>compile("org.springframework.boot:spring-boot-starter-jdbc")<% } %>
46 | <% if (jpa) { %>compile("org.springframework.boot:spring-boot-starter-data-jpa")<% } %>
47 | <% if (mongodb) { %>compile("org.springframework.boot:spring-boot-starter-data-mongodb")<% } %>
48 | <% if (redis) { %>compile("org.springframework.boot:spring-boot-starter-data-redis")<% } %>
49 | <% if (solr) { %>compile("org.springframework.boot:spring-boot-starter-data-solr")<% } %>
50 | <% if (elasticsearch) { %>compile("org.springframework.boot:spring-boot-starter-data-elasticsearch")<% } %>
51 |
52 | <% if (connectors) { %>compile("org.springframework.boot:spring-boot-starter-cloud-connectors")<% } %>
53 | <% if (bootstrap) { %>compile("org.springframework.cloud:spring-cloud-starter")<% } %>
54 | <% if (configClient) { %>compile("org.springframework.cloud:spring-cloud-starter-config")<% } %>
55 | <% if (configServer) { %>compile("org.springframework.cloud:spring-cloud-config-server")<% } %>
56 | <% if (eureka) { %>compile("org.springframework.cloud:spring-cloud-starter-eureka")<% } %>
57 | <% if (eurekaServer) { %>compile("org.springframework.cloud:spring-cloud-starter-eureka-server")<% } %>
58 | <% if (feign) { %>compile("org.springframework.cloud:spring-cloud-starter-feign")<% } %>
59 | <% if (hystrix) { %>compile("org.springframework.cloud:spring-cloud-starter-hystrix")<% } %>
60 | <% if (hystrixDashboard) { %>compile("org.springframework.cloud:spring-cloud-starter-hystrix-dashboard")<% } %>
61 | <% if (oauth2) { %>compile("org.springframework.cloud:spring-cloud-starter-oauth2")<% } %>
62 | <% if (ribbon) { %>compile("org.springframework.cloud:spring-cloud-starter-ribbon")<% } %>
63 | <% if (turbine) { %>compile("org.springframework.cloud:spring-cloud-starter-turbine")<% } %>
64 | <% if (turbineAmqp) { %>compile("org.springframework.cloud:spring-cloud-starter-turbine-amqp")<% } %>
65 | <% if (zuul) { %>compile("org.springframework.cloud:spring-cloud-starter-zuul")<% } %>
66 | <% if (aws) { %>compile("org.springframework.cloud:spring-cloud-starter-aws")<% } %>
67 | <% if (awsJdbc) { %>compile("org.springframework.cloud:spring-cloud-starter-aws-jdbc")<% } %>
68 | <% if (awsMessaging) { %>compile("org.springframework.cloud:spring-cloud-starter-aws-messaging")<% } %>
69 | <% if (cloudBus) { %>compile("org.springframework.cloud:spring-cloud-starter-bus-amqp")<% } %>
70 | <% if (cloudSecurity) { %>compile("org.springframework.cloud:spring-cloud-starter-security")<% } %>
71 |
72 | <% if (batch) { %>compile("org.springframework.boot:spring-boot-starter-batch")<% } %>
73 | <% if (integration) { %>compile("org.springframework.boot:spring-boot-starter-integration")<% } %>
74 | <% if (jms) { %>compile("org.springframework.boot:spring-boot-starter-hornetq")<% } %>
75 | <% if (amqp) { %>compile("org.springframework.boot:spring-boot-starter-amqp")<% } %>
76 | <% if (mail) { %>compile("org.springframework.boot:spring-boot-starter-mail")<% } %>
77 |
78 | <% if (facebook) { %>compile("org.springframework.boot:spring-boot-starter-social-facebook")<% } %>
79 | <% if (linkedin) { %>compile("org.springframework.boot:spring-boot-starter-social-linkedin")<% } %>
80 | <% if (twitter) { %>compile("org.springframework.boot:spring-boot-starter-social-twitter")<% } %>
81 |
82 | <% if (actuator) { %>compile("org.springframework.boot:spring-boot-starter-actuator")<% } %>
83 | <% if (remoteshell) { %>compile("org.springframework.boot:spring-boot-starter-remote-shell")<% } %>
84 | compile("org.codehaus.groovy:groovy:<%= groovyVersion %>")
85 |
86 | <% if (h2) { %>runtime("com.h2database:h2")<% } %>
87 | <% if (hsqldb) { %>runtime("org.hsqldb:hsqldb")<% } %>
88 | <% if (derby) { %>runtime("org.apache.derby:derby")<% } %>
89 | <% if (mysql) { %>runtime("mysql:mysql-connector-java")<% } %>
90 | <% if (postgresql) { %>runtime("org.postgresql:postgresql:9.4-1201-jdbc41")<% } %>
91 |
92 | <% if (useSpock) { %>
93 | testCompile("org.spockframework:spock-spring")
94 | testCompile("org.spockframework:spock-core:1.0-groovy-2.4")
95 | <% } %>
96 | <% if (web) { %>testCompile("org.springframework.boot:spring-boot-starter-test")<% } %>
97 | }
98 |
99 | <% if (usesCloud) { %>
100 | dependencyManagement {
101 | imports {
102 | mavenBom("org.springframework.cloud:spring-cloud-starter-parent:Angel.SR3")
103 | }
104 | }
105 | <% } %>
106 | <% if (jar) { %>
107 | jar {
108 | baseName = '<%= baseName %>'
109 | }<% } %>
110 | <% if (war) { %>
111 | war {
112 | baseName = '<%= baseName %>'
113 | }<% } %>
114 |
115 | task (type: Wrapper) {
116 | gradleVersion = '2.3'
117 | }
118 |
--------------------------------------------------------------------------------
/app/templates/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |