From 6e5d3b60adf65b2ac45cb58b0cd9b8e6ebc7f0af Mon Sep 17 00:00:00 2001 From: Thibault Pensec <39826516+symphony-thibault@users.noreply.github.com> Date: Tue, 6 Oct 2020 18:34:41 +0200 Subject: [PATCH] APP-3078 Update examples (#73) --- generators/bdk/java/index.js | 33 ++++++----- .../bdk/java/templates/build.gradle.ejs | 20 ++++--- .../templates/common/GifFormActivity.java.ejs | 40 +++++++++++++ .../templates/java/BotApplication.java.ejs | 58 +++++++++++++++++++ .../src/main/java/BotApplication.java.ejs | 45 -------------- generators/bdk/java/templates/pom.xml.ejs | 23 +++----- .../main/java => }/BotApplication.java.ejs | 0 .../templates/spring/GifSlashHandler.java.ejs | 25 ++++++++ .../spring/OnUserJoinedRoomListener.java.ejs | 36 ++++++++++++ .../templates/spring/application.yaml.ejs | 6 +- .../src/main/java/GifFormActivity.java.ejs | 51 ---------------- .../java/RealTimeEventsComponent.java.ejs | 34 ----------- generators/bdk/java/templates/welcome.ftl | 3 + test/java-bdk.spec.js | 28 +++++---- 14 files changed, 224 insertions(+), 178 deletions(-) create mode 100644 generators/bdk/java/templates/common/GifFormActivity.java.ejs create mode 100644 generators/bdk/java/templates/java/BotApplication.java.ejs delete mode 100644 generators/bdk/java/templates/java/src/main/java/BotApplication.java.ejs rename generators/bdk/java/templates/spring/{src/main/java => }/BotApplication.java.ejs (100%) create mode 100644 generators/bdk/java/templates/spring/GifSlashHandler.java.ejs create mode 100644 generators/bdk/java/templates/spring/OnUserJoinedRoomListener.java.ejs delete mode 100644 generators/bdk/java/templates/spring/src/main/java/GifFormActivity.java.ejs delete mode 100644 generators/bdk/java/templates/spring/src/main/java/RealTimeEventsComponent.java.ejs create mode 100644 generators/bdk/java/templates/welcome.ftl diff --git a/generators/bdk/java/index.js b/generators/bdk/java/index.js index fe37975..f2a805c 100644 --- a/generators/bdk/java/index.js +++ b/generators/bdk/java/index.js @@ -8,9 +8,9 @@ const axios = require('axios') const BASE_JAVA = 'src/main/java'; const BASE_RESOURCES = 'src/main/resources'; -const BDK_VERSION_DEFAULT = '1.2.1.BETA'; +const BDK_VERSION_DEFAULT = '1.3.2.BETA'; const SPRING_VERSION_DEFAULT = '2.3.4.RELEASE' -const MAVEN_SEARCH_BASE = 'https://search.maven.org/solrsearch/select?q=g:com.symphony.platformsolutions+AND+a:'; +const MAVEN_BDK_BOM_SEARCH_BASE = 'https://search.maven.org/solrsearch/select?q=g:com.symphony.platformsolutions+AND+a:'; const MAVEN_SPRING_BOOT_SEARCH_BASE = 'https://search.maven.org/solrsearch/select?q=g:org.springframework.boot'; module.exports = class extends Generator { @@ -75,7 +75,7 @@ module.exports = class extends Generator { // get latest BDK BOM version try { - const mavenResponse = await axios.get(MAVEN_SEARCH_BASE + 'symphony-bdk-bom'); + const mavenResponse = await axios.get(MAVEN_BDK_BOM_SEARCH_BASE + 'symphony-bdk-bom'); this.answers.bdkBomVersion = mavenResponse.data['response']['docs'][0]['latestVersion']; this.log('Latest BDK version is '.green.bold + `${this.answers.bdkBomVersion}`.white.bold); } catch (error) { @@ -109,7 +109,7 @@ module.exports = class extends Generator { this.answers.springBootVersion = mavenResponse.data['response']['docs'][0]['latestVersion']; } catch (error) { this.log(`\u26A0 Cannot retrieve latest Spring Boot Starter version from Maven Central. Default: ${SPRING_VERSION_DEFAULT}`.grey); - this.answers.bdkBomVersion = SPRING_VERSION_DEFAULT; + this.answers.springBootVersion = SPRING_VERSION_DEFAULT; } // process and copy application.yaml file @@ -117,7 +117,7 @@ module.exports = class extends Generator { this.templatePath(path.join(this.answers.framework, 'application.yaml.ejs')), this.destinationPath(path.join(BASE_RESOURCES, 'application.yaml')), this.answers - ) + ); break; } @@ -125,19 +125,24 @@ module.exports = class extends Generator { // process and copy template file this.fs.copyTpl( this.templatePath('gif.ftl'), - this.destinationPath(path.join(BASE_RESOURCES, "templates", "gif.ftl")) - ) + this.destinationPath(path.join(BASE_RESOURCES, 'templates', 'gif.ftl')) + ); + this.fs.copyTpl( + this.templatePath('welcome.ftl'), + this.destinationPath(path.join(BASE_RESOURCES, 'templates', 'welcome.ftl')) + ); - // Process Java file - this._copyJavaTemplate(path.join(this.answers.framework, BASE_JAVA), basePackage); + // Process Framework specific files + this._copyJavaTemplate(this.answers.framework, basePackage); + // Process Common files + this._copyJavaTemplate('common', basePackage); // Process build files if (this.answers.build === 'Gradle') { - this._processGradleFiles() + this._processGradleFiles(); } else { - this._processMavenFiles() + this._processMavenFiles(); } - } /** @@ -167,13 +172,13 @@ module.exports = class extends Generator { _copyJavaTemplate(dirPath, basePackage) { let files = fs.readdirSync(path.join(__dirname, 'templates', dirPath)) - files.forEach(file => { + files.filter(f => f.endsWith('java.ejs')).forEach(file => { this.fs.copyTpl( this.templatePath(path.join(dirPath, file)), this.destinationPath(path.join(BASE_JAVA, basePackage, file.substr(0,file.length - 4))), this.answers ); - }) + }); } _processGradleFiles() { diff --git a/generators/bdk/java/templates/build.gradle.ejs b/generators/bdk/java/templates/build.gradle.ejs index e88b9f7..c69c94c 100644 --- a/generators/bdk/java/templates/build.gradle.ejs +++ b/generators/bdk/java/templates/build.gradle.ejs @@ -1,7 +1,11 @@ plugins { id 'java-library' +<% if (framework == 'java') { %> id 'application' - <% if (framework == 'spring') { %>id 'org.springframework.boot' version "<%= springBootVersion %>"<% } %> +<% } %> +<% if (framework == 'spring') { %> + id 'org.springframework.boot' version "<%= springBootVersion %>" +<% } %> } repositories { @@ -12,23 +16,23 @@ dependencies { implementation platform('com.symphony.platformsolutions:symphony-bdk-bom:<%= bdkBomVersion %>') - // define dependencies without versions <% if (framework == 'java') { %> implementation 'com.symphony.platformsolutions:symphony-bdk-core' - implementation 'com.symphony.platformsolutions:symphony-bdk-http-api' - implementation 'com.symphony.platformsolutions:symphony-bdk-template-api' runtimeOnly 'com.symphony.platformsolutions:symphony-bdk-template-freemarker' runtimeOnly 'com.symphony.platformsolutions:symphony-bdk-http-jersey2' - <% } else if (framework == 'spring') { %> implementation 'com.symphony.platformsolutions:symphony-bdk-core-spring-boot-starter' + implementation 'org.springframework.boot:spring-boot-starter' +<% } %> - implementation 'org.springframework.boot:spring-boot-starter'<% } %> - implementation 'ch.qos.logback:logback-classic' + implementation 'org.slf4j:slf4j-api' + runtimeOnly 'ch.qos.logback:logback-classic' } +<% if (framework == 'java') { %> application { mainClass = '<%= basePackage %>.BotApplication' } +<% } %> -version = '1.0.0-SNAPSHOT' \ No newline at end of file +version = '0.0.1-SNAPSHOT' \ No newline at end of file diff --git a/generators/bdk/java/templates/common/GifFormActivity.java.ejs b/generators/bdk/java/templates/common/GifFormActivity.java.ejs new file mode 100644 index 0000000..8104ad8 --- /dev/null +++ b/generators/bdk/java/templates/common/GifFormActivity.java.ejs @@ -0,0 +1,40 @@ +package <%= basePackage %>; + +import com.symphony.bdk.core.activity.ActivityMatcher; +import com.symphony.bdk.core.activity.form.FormReplyActivity; +import com.symphony.bdk.core.activity.form.FormReplyContext; +import com.symphony.bdk.core.activity.model.ActivityInfo; +import com.symphony.bdk.core.activity.model.ActivityType; +import com.symphony.bdk.core.service.MessageService; +<% if (framework == 'spring') { %> +import org.springframework.stereotype.Component; + +@Component<% } %> +public class GifFormActivity extends FormReplyActivity<%-'<'%>FormReplyContext<%-'>'%> { + + private final MessageService messageService; + + public GifFormActivity(MessageService messageService) { + this.messageService = messageService; + } + + @Override + public ActivityMatcher<%-'<'%>FormReplyContext<%-'>'%> matcher() { + return context -> "gif-category-form".equals(context.getFormId()) + && "submit".equals(context.getFormValue("action")); + } + + @Override + public void onActivity(FormReplyContext context) { + final String category = context.getFormValue("category"); + final String message = "<%-'<'%>messageML<%-'>'%>Received category '" + category + "'<%-'<'%>/messageML<%-'>'%>"; + this.messageService.send(context.getSourceEvent().getStream(), message); + } + + @Override + protected ActivityInfo info() { + return new ActivityInfo().type(ActivityType.FORM) + .name("Gif Display category form command") + .description("\"Form handler for the Gif Category form\""); + } +} diff --git a/generators/bdk/java/templates/java/BotApplication.java.ejs b/generators/bdk/java/templates/java/BotApplication.java.ejs new file mode 100644 index 0000000..43b6cce --- /dev/null +++ b/generators/bdk/java/templates/java/BotApplication.java.ejs @@ -0,0 +1,58 @@ +package <%= basePackage %>; + +import com.symphony.bdk.core.SymphonyBdk; +import com.symphony.bdk.template.api.TemplateException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.symphony.bdk.gen.api.model.V4UserJoinedRoom; +import com.symphony.bdk.gen.api.model.V4Initiator; +import com.symphony.bdk.core.service.datafeed.RealTimeEventListener; +import static com.symphony.bdk.core.config.BdkConfigLoader.loadFromClasspath; +import static com.symphony.bdk.core.activity.command.SlashCommand.slash; +import static java.util.Collections.emptyMap; +import static java.util.Collections.singletonMap; + +/** + * Simple Bot Application. + */ +public class BotApplication { + + /** The Logger */ + private static final Logger log = LoggerFactory.getLogger(BotApplication.class); + + public static void main(String[] args) throws Exception { + + // Initialize BDK entry point + final SymphonyBdk bdk = new SymphonyBdk(loadFromClasspath("/config.yaml")); + + // Register a "slash" activity + bdk.activities().register(slash("/gif", false, context -> { + try { + bdk.messages().send(context.getStreamId(), "/templates/gif.ftl", emptyMap()); + } catch (TemplateException e) { + log.error("Unable to load template", e); + } + })); + + // Register a "formReply" activity that handles the Gif category form submission + bdk.activities().register(new GifFormActivity(bdk.messages())); + + // Subscribe to 'onUserJoinedRoom' Real Time Event + bdk.datafeed().subscribe(new RealTimeEventListener() { + + @Override + public void onUserJoinedRoom(V4Initiator initiator, V4UserJoinedRoom event) { + final String userDisplayName = event.getAffectedUser().getDisplayName(); + try { + bdk.messages().send(event.getStream(), "/templates/welcome.ftl", singletonMap("name", userDisplayName)); + } catch (TemplateException e) { + log.error("Unable to load template", e); + } + } + }); + + // finally, start the datafeed read loop + bdk.datafeed().start(); + } +} diff --git a/generators/bdk/java/templates/java/src/main/java/BotApplication.java.ejs b/generators/bdk/java/templates/java/src/main/java/BotApplication.java.ejs deleted file mode 100644 index 65d8a8a..0000000 --- a/generators/bdk/java/templates/java/src/main/java/BotApplication.java.ejs +++ /dev/null @@ -1,45 +0,0 @@ -package <%= basePackage %>; - -import com.symphony.bdk.core.SymphonyBdk; -import com.symphony.bdk.template.api.TemplateException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import static com.symphony.bdk.core.config.BdkConfigLoader.loadFromClasspath; -import static com.symphony.bdk.core.activity.command.SlashCommand.slash; -import static java.util.Collections.emptyMap; - -/** - * FormReply Sample Application. - */ -public class BotApplication { - - /** The Logger */ - private static final Logger log = LoggerFactory.getLogger(BotApplication.class); - - public static void main(String[] args) throws Exception { - - // Initialize BDK entry point - final SymphonyBdk bdk = new SymphonyBdk(loadFromClasspath("/config.yaml")); - - bdk.activities().register(slash( - "/gif", - true, - context -> { - try { - bdk.messages().send(context.getStreamId(), "/templates/gif.ftl", emptyMap()); - } catch (TemplateException e) { - log.error(e.getMessage()); - } - } - )); - - Runtime.getRuntime().addShutdownHook(new Thread(() -> { - log.info("Stopping Datafeed..."); - bdk.datafeed().stop(); - })); - - // finally, start the datafeed read loop - bdk.datafeed().start(); - } -} diff --git a/generators/bdk/java/templates/pom.xml.ejs b/generators/bdk/java/templates/pom.xml.ejs index 2fcf9e4..5729b55 100644 --- a/generators/bdk/java/templates/pom.xml.ejs +++ b/generators/bdk/java/templates/pom.xml.ejs @@ -6,7 +6,7 @@ <%= groupId %> <%= artifactId %> - 1.0.0-SNAPSHOT + 0.0.1-SNAPSHOT UTF-8 @@ -32,23 +32,23 @@ com.symphony.platformsolutions - symphony-bdk-http-api + symphony-bdk-template-freemarker + runtime com.symphony.platformsolutions - symphony-bdk-template-api + symphony-bdk-http-jersey2 + runtime - com.symphony.platformsolutions - symphony-bdk-template-freemarker - runtime + org.slf4j + slf4j-api - com.symphony.platformsolutions - symphony-bdk-http-jersey2 + ch.qos.logback + logback-classic runtime - <% } else if (framework == 'spring') { %> com.symphony.platformsolutions @@ -59,11 +59,6 @@ spring-boot-starter <% } %> - - ch.qos.logback - logback-classic - - diff --git a/generators/bdk/java/templates/spring/src/main/java/BotApplication.java.ejs b/generators/bdk/java/templates/spring/BotApplication.java.ejs similarity index 100% rename from generators/bdk/java/templates/spring/src/main/java/BotApplication.java.ejs rename to generators/bdk/java/templates/spring/BotApplication.java.ejs diff --git a/generators/bdk/java/templates/spring/GifSlashHandler.java.ejs b/generators/bdk/java/templates/spring/GifSlashHandler.java.ejs new file mode 100644 index 0000000..15fd7ec --- /dev/null +++ b/generators/bdk/java/templates/spring/GifSlashHandler.java.ejs @@ -0,0 +1,25 @@ +package <%= basePackage %>; + +import static java.util.Collections.emptyMap; + +import com.symphony.bdk.core.activity.command.CommandContext; +import com.symphony.bdk.core.service.MessageService; +import com.symphony.bdk.spring.annotation.Slash; +import com.symphony.bdk.template.api.TemplateException; + +import org.springframework.stereotype.Component; + +@Component +public class GifSlashHandler { + + private final MessageService messageService; + + public GifSlashHandler(MessageService messageService) { + this.messageService = messageService; + } + + @Slash(value = "/gif", mentionBot = false) + public void onSlashGif(CommandContext context) throws TemplateException { + this.messageService.send(context.getStreamId(), "/templates/gif.ftl", emptyMap()); + } +} diff --git a/generators/bdk/java/templates/spring/OnUserJoinedRoomListener.java.ejs b/generators/bdk/java/templates/spring/OnUserJoinedRoomListener.java.ejs new file mode 100644 index 0000000..cacea42 --- /dev/null +++ b/generators/bdk/java/templates/spring/OnUserJoinedRoomListener.java.ejs @@ -0,0 +1,36 @@ +package <%= basePackage %>; + +import com.symphony.bdk.core.service.MessageService; +import com.symphony.bdk.core.service.datafeed.RealTimeEventListener; +import com.symphony.bdk.gen.api.model.V4Initiator; +import com.symphony.bdk.gen.api.model.V4UserJoinedRoom; +import com.symphony.bdk.template.api.TemplateException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import static java.util.Collections.singletonMap; + +@Component +public class OnUserJoinedRoomListener implements RealTimeEventListener { + + private static final Logger log = LoggerFactory.getLogger(OnUserJoinedRoomListener.class); + + private final MessageService messageService; + + @Autowired + public OnUserJoinedRoomListener(MessageService messageService) { + this.messageService = messageService; + } + + @Override + public void onUserJoinedRoom(V4Initiator initiator, V4UserJoinedRoom event) { + final String userDisplayName = event.getAffectedUser().getDisplayName(); + try { + this.messageService.send(event.getStream(), "/templates/welcome.ftl", singletonMap("name", userDisplayName)); + } catch (TemplateException e) { + log.error("Unable to load template", e); + } + } +} \ No newline at end of file diff --git a/generators/bdk/java/templates/spring/application.yaml.ejs b/generators/bdk/java/templates/spring/application.yaml.ejs index a777a9f..782ba78 100644 --- a/generators/bdk/java/templates/spring/application.yaml.ejs +++ b/generators/bdk/java/templates/spring/application.yaml.ejs @@ -3,4 +3,8 @@ bdk: bot: username: <%= username %> - privateKeyPath: <%= privateKeyPath %> \ No newline at end of file + privateKeyPath: <%= privateKeyPath %> + +logging: + level: + com.symphony: debug \ No newline at end of file diff --git a/generators/bdk/java/templates/spring/src/main/java/GifFormActivity.java.ejs b/generators/bdk/java/templates/spring/src/main/java/GifFormActivity.java.ejs deleted file mode 100644 index 050b7fd..0000000 --- a/generators/bdk/java/templates/spring/src/main/java/GifFormActivity.java.ejs +++ /dev/null @@ -1,51 +0,0 @@ -package <%= basePackage %>; - -import com.symphony.bdk.core.activity.ActivityMatcher; -import com.symphony.bdk.core.activity.command.CommandContext; -import com.symphony.bdk.core.activity.form.FormReplyActivity; -import com.symphony.bdk.core.activity.form.FormReplyContext; -import com.symphony.bdk.core.activity.model.ActivityInfo; -import com.symphony.bdk.core.activity.model.ActivityType; -import com.symphony.bdk.core.service.MessageService; -import com.symphony.bdk.spring.annotation.Slash; -import com.symphony.bdk.template.api.TemplateException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import static java.util.Collections.emptyMap; - -@Component -public class GifFormActivity extends FormReplyActivity<%-'<'%>FormReplyContext<%-'>'%> { - - private static final Logger log = LoggerFactory.getLogger(GifFormActivity.class); - - @Autowired - private MessageService messageService; - - @Slash("/gif") - public void displayGifForm(CommandContext context) throws TemplateException { - this.messageService.send(context.getStreamId(), "/templates/gif.ftl", emptyMap()); - } - - @Override - public ActivityMatcher<%-'<'%>FormReplyContext<%-'>'%> matcher() { - return context -> "gif-category-form".equals(context.getFormId()) - && "submit".equals(context.getFormValue("action")) - && !StringUtils.isEmpty(context.getFormValue("category")); - } - - @Override - public void onActivity(FormReplyContext context) { - log.info("Gif category is \"{}\"", context.getFormValue("category")); - } - - @Override - protected ActivityInfo info() { - return new ActivityInfo().type(ActivityType.FORM) - .name("Gif Display category form command") - .description("\"Form handler for the Gif Category form\""); - } -} \ No newline at end of file diff --git a/generators/bdk/java/templates/spring/src/main/java/RealTimeEventsComponent.java.ejs b/generators/bdk/java/templates/spring/src/main/java/RealTimeEventsComponent.java.ejs deleted file mode 100644 index 18bcecd..0000000 --- a/generators/bdk/java/templates/spring/src/main/java/RealTimeEventsComponent.java.ejs +++ /dev/null @@ -1,34 +0,0 @@ -package <%= basePackage %>; - -import com.symphony.bdk.gen.api.model.V4MessageSent; -import com.symphony.bdk.gen.api.model.V4UserJoinedRoom; -import com.symphony.bdk.gen.api.model.V4UserLeftRoom; -import com.symphony.bdk.spring.events.RealTimeEvent; -import org.springframework.context.event.EventListener; -import org.springframework.stereotype.Component; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** -* Demo class showing how to subscribe to a specific {@link RealTimeEvent}. -*/ -@Component -public class RealTimeEventsComponent { - - private static final Logger log = LoggerFactory.getLogger(BotApplication.class); - - @EventListener - public void onMessageSent(RealTimeEvent<%-'<'%>V4MessageSent<%-'>'%> event) { - log.info(event.toString()); - } - - @EventListener - public void onUserJoined(RealTimeEvent<%-'<'%>V4UserJoinedRoom<%-'>'%> event) { - log.info(event.toString()); - } - - @EventListener - public void onUserLeft(RealTimeEvent<%-'<'%>V4UserLeftRoom<%-'>'%> event) { - log.info(event.toString()); - } -} \ No newline at end of file diff --git a/generators/bdk/java/templates/welcome.ftl b/generators/bdk/java/templates/welcome.ftl new file mode 100644 index 0000000..3545738 --- /dev/null +++ b/generators/bdk/java/templates/welcome.ftl @@ -0,0 +1,3 @@ + + Welcome ${name}! You can start by typing '/gif' command in the chat. + diff --git a/test/java-bdk.spec.js b/test/java-bdk.spec.js index 521d64d..fb0973e 100644 --- a/test/java-bdk.spec.js +++ b/test/java-bdk.spec.js @@ -17,7 +17,7 @@ axios.get.mockImplementation((url) => { response: { docs: [ { - latestVersion: "1.2.2" + latestVersion: "1.3.2.BETA" } ] } @@ -55,9 +55,11 @@ it('Generate 2.0 spring boot gradle', () => { 'build.gradle', path.join(BASE_JAVA, PACKAGE_DIR, 'BotApplication.java'), path.join(BASE_JAVA, PACKAGE_DIR, 'GifFormActivity.java'), - path.join(BASE_JAVA, PACKAGE_DIR, 'RealTimeEventsComponent.java'), - path.join(BASE_RESOURCE, 'rsa/privatekey.pem'), - path.join(BASE_RESOURCE, 'rsa/publickey.pem'), + path.join(BASE_JAVA, PACKAGE_DIR, 'OnUserJoinedRoomListener.java'), + path.join(BASE_JAVA, PACKAGE_DIR, 'GifSlashHandler.java'), + // path.join(BASE_RESOURCE, 'rsa/privatekey.pem'), + // path.join(BASE_RESOURCE, 'rsa/publickey.pem'), + path.join(BASE_RESOURCE, 'templates/welcome.ftl'), path.join(BASE_RESOURCE, 'templates/gif.ftl'), path.join(BASE_RESOURCE, 'application.yaml') ]); @@ -84,8 +86,9 @@ it('Generate 2.0 java gradle', () => { 'gradlew.bat', 'build.gradle', path.join(BASE_JAVA, PACKAGE_DIR, 'BotApplication.java'), - path.join(BASE_RESOURCE, 'rsa/privatekey.pem'), - path.join(BASE_RESOURCE, 'rsa/publickey.pem'), + // path.join(BASE_RESOURCE, 'rsa/privatekey.pem'), + // path.join(BASE_RESOURCE, 'rsa/publickey.pem'), + path.join(BASE_RESOURCE, 'templates/welcome.ftl'), path.join(BASE_RESOURCE, 'templates/gif.ftl'), path.join(BASE_RESOURCE, 'config.yaml') ]); @@ -114,9 +117,11 @@ it('Generate 2.0 spring boot maven', () => { 'pom.xml', path.join(BASE_JAVA, PACKAGE_DIR, 'BotApplication.java'), path.join(BASE_JAVA, PACKAGE_DIR, 'GifFormActivity.java'), - path.join(BASE_JAVA, PACKAGE_DIR, 'RealTimeEventsComponent.java'), - path.join(BASE_RESOURCE, 'rsa/privatekey.pem'), - path.join(BASE_RESOURCE, 'rsa/publickey.pem'), + path.join(BASE_JAVA, PACKAGE_DIR, 'OnUserJoinedRoomListener.java'), + path.join(BASE_JAVA, PACKAGE_DIR, 'GifSlashHandler.java'), + // path.join(BASE_RESOURCE, 'rsa/privatekey.pem'), + // path.join(BASE_RESOURCE, 'rsa/publickey.pem'), + path.join(BASE_RESOURCE, 'templates/welcome.ftl'), path.join(BASE_RESOURCE, 'templates/gif.ftl'), path.join(BASE_RESOURCE, 'application.yaml') ]); @@ -144,8 +149,9 @@ it('Generate 2.0 java maven', () => { 'mvnw.cmd', 'pom.xml', path.join(BASE_JAVA, PACKAGE_DIR, 'BotApplication.java'), - path.join(BASE_RESOURCE, 'rsa/privatekey.pem'), - path.join(BASE_RESOURCE, 'rsa/publickey.pem'), + // path.join(BASE_RESOURCE, 'rsa/privatekey.pem'), + // path.join(BASE_RESOURCE, 'rsa/publickey.pem'), + path.join(BASE_RESOURCE, 'templates/welcome.ftl'), path.join(BASE_RESOURCE, 'templates/gif.ftl'), path.join(BASE_RESOURCE, 'config.yaml') ]);