-
1 votesanswersviews
使用Spring Boot Gradle插件的多模块项目
多模块项目具有以下依赖关系的模块:web-> core-> persistence 我在网络模块中添加了spring-boot-gradle-plugin: buildscript { repositories { jcenter() } dependencies { classpath("org.springfram... -
0 votesanswersviews
spring-boot-gradle-plugin打破了依赖缓存策略
我的项目依赖于更改模块(foo,maven SNAPSHOT依赖项)进行调试,foo总是在变化 . 在我添加 apply plugin 'spring-boot' 之后,foo被缓存了很长时间 . what should i do to let changing module works fine with spring-boot plugin? //my build.gradle file.... -
1 votesanswersviews
在Linux上破坏了Gradle Spring Boot插件
我有一个多模块gradle构建,其中包含一个包含Spring Boot应用程序的模块,该应用程序使用其他模块的工件 . 我将spring boot插件应用于单个 spring 启动模块 . 一切都在Windows中正常工作,但一旦我尝试在Linux机器上构建失败 . 我已经尝试了多台Linux机器(Jenkins服务器,Ubuntu VM,甚至是bitbucket管道),它失败并出现此错误: Pr... -
1 votesanswersviews
spring boot gradle plugin更改项目依赖项版本
我遇到了困扰我的问题 . 我使用gradle build spring-boot项目,我想要打包运行时jar . 这是我的依赖: buildscript { dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.5.RELEASE"... -
2 votesanswersviews
Spring Boot Gradle插件 - 使用多模块项目实时重新加载资源
我在实时重新加载静态资源以使用gradle多模块项目时遇到问题 . 这是我简化的项目结构: project - application - src/main/java/com/mypackage/MyApplication.java - web - src/main/resources/index.html 如果我正在运行spring boot gradle插件 bootRun 任务来启动我的应用... -
1 votesanswersviews
Spring引导和Gradle多模块项目无法正确加载依赖项
基本上我有一个使用Gradle构建的spring boot项目 . 该项目有一个根项目,其中包含另外4个子模块 . 根项目settings.gradle如下所示: rootProject.name = 'proj' include 'proj-app' include 'proj-integration-tests' include 'proj-model' include 'proj-serv... -
0 votesanswersviews
如何将src / dist添加到spring引导分发中
它非常像 spring 靴gradle插件不像应用程序插件那样打包src / dist的内容 . 如何将src / dist的内容添加到我的spring boot分发zip和tar中? plugins { id 'java' id 'application' id 'org.springframework.boot' version '2.0.2.RELEASE' ... -
1 votesanswersviews
我应该如何在Gradle中为Spring Boot应用程序设置主类?
我读了 Spring 季启动文档,我看到至少有两种方法来设置主类: bootRepackage { mainClass = 'demo.Application' } 和 springBoot { mainClass = "demo.Application" } 我应该使用哪一个,或者它们都是不同任务所必需的?我不想重复自己 . -
3 votesanswersviews
无法使用spring启动插件解析子模块的依赖关系
我使用gradle,并且有一个应用了spring boot插件的模块/项目 . 让我们说一个项目 sub-module ,我有 apply plugin: "spring-boot" . 现在从另一个模块/项目我将testCompile依赖项添加到子模块 . 从另一个项目 main-module 说,我添加了以下依赖项 dependencies { testCompil... -
1 votesanswersviews
从Gradle多项目构建中构建完全可执行的Spring Boot 1.3战争
我正在尝试根据https://docs.spring.io/spring-boot/docs/current/reference/html/deployment-install.html使用Spring Boot 1.3构建一个完全可执行的WAR . 如果我构建一个单独的Gradle项目,它一切正常,但我有一个多项目构建,我有一个"root"项目,然后在它下面的几个项目,我不能... -
1 votesanswersviews
Spring Boot Gradle bootRun任务默认类路径和当前工作目录
我将测试应用程序的外部配置 . 什么是Spring Boot Gradle bootRun任务的默认类路径和默认工作目录? 我没有进来: http://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-running-your-application.html https://docs.spring.io/s... -
2 votesanswersviews
在Google App Engine上运行的Spring Boot Web应用程序 - 抛出jetty异常
当我执行 gradlew appengineRun 时,我始终得到: Starting a Gradle Daemon (subsequent builds will be faster) Mar 26, 2018 5:47:48 PM java.util.prefs.WindowsPreferences <init> WARNING: Could not open/create pr... -
2 votesanswersviews
Spring引导多个gradle项目依赖于mangament - >无法更改配置的依赖关系
我有几个项目,每个都有类似的结构 projectA | - projectA-module1 | - projectA-module2 | - projectA-service project-service - >这个模块已经应用了spring boot插件,它可以部署所有其他模块都是这个模块的依赖项 . 每个模块只需要特定的spring依赖项 . module1需要邮件api,mo... -
0 votesanswersviews
如何使用Gradle使多个spring boot项目依赖项工作?
我只是使用spring boot initializer来创建基础和子项目以及使用最简单的多个项目 . 我将settings.gradle设置为root到 include 'base','sub' . 我还在sub / gradle.build中添加了 compile project(':base') 依赖项 . 当我在根文件夹中运行 gradle build 时,执行时将始终失败:sub:co... -
2 votesanswersviews
没有可执行jar的Spring Boot 2 Gradle插件
如何配置Spring Boot Gradle插件2以禁用Gradle Script Kotlin中的Boot分发 . 我想要的发行版是一个程序集包zip,包含lib文件夹中的所有依赖项(和jar) . 我启用了Jar任务并禁用了bootJar任务 . 我的构建文件的当前来源https://github.com/Skatteetaten/mokey/blob/825a81f20c21a2220876... -
1 votesanswersviews
Spring Boot - 将应用程序类打包为BOOT-INF / lib中的jar
我正在使用带有Gradle 3.1的Spring Boot 1.4.1 . 应用了Spring Boot插件的模块使用 jar 任务创建自己的jar,并且还使用 bootRepackage 创建了'fat' jar . 但是,该模块中的类在BOOT-INF / classes中,但我希望它们位于BOOT-INF / lib中的单独jar中 . 这该怎么做? EDIT: 我知道我可以将代码移动到一个... -
2 votesanswersviews
通过命令行运行非主类的spring boot应用程序
我将spring boot应用程序打包为可执行jar . 应用程序有一个带有main方法的实用程序类,我想通过命令行调用,但似乎命令无法在类路径中找到该类 . 命令: java -cp client-stp-grid-publisher-SNAPSHOT.jar com.client.stp.util.JMXClientUtils 我尝试使用gradle jar任务在MANIFEST.MF中设置... -
5 votesanswersviews
如何使用spring-boot gradle插件进行编程
如何使用spring boot 2和gradle build设置proguard混淆? 你好 . 尝试使用gradle插件和Proguard gradle插件设置Spring Boot应用程序的代码混淆 . 谷歌主要提供一些旧的spring-boot-gradle-plugin版本的方法(即this closest one使用不存在的bootRepackage任务),或使用maven插件(具有重新... -
0 votesanswersviews
使用Gradle和Spring Boot Gradle插件时,如何从其他模块复制spring boot重新包装的jar?
我有一个多模块gradle项目,它使用Spring Boot Gradle插件,其中一个模块构建spring boot重新打包jar,另一个模块尝试构建docker容器 . 如何从不同的模块复制 spring 启动重新包装的jar? 我试过这个: task copyBootJar(type: Copy, overwrite: true) { from project(':foo-bar:s... -
0 votesanswersviews
Gradle Spring Boot - spring jar 版本不会自动拾取
我正在尝试一个简单的gradle spring boot应用程序,如下面的URL https://spring.io/guides/gs/spring-boot/ 这是我的build.gradle文件 apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'org.springframework.boot' jar { ba... -
0 votesanswersviews
springboot2.0.3 redis config(java.lang.IllegalStateException:无法为'Builder解析缓存)
java.lang.IllegalStateException:无法解析'Builder [public com.test.demo.model.User com.test.demo.service.UserSerImpl.selectUser(java.lang.Integer)] caches = [] | key ='#uId'| keyGenerator =''| cacheManager... -
0 votesanswersviews
如何注入分机spring-boot gradle插件属性中的属性
spring boot gradle插件让我们指定: springBoot { buildInfo { properties { version = 'a version' } } } 可以应用git-versioner-plugin,设置git外部属性 . 不幸的是,我还没有找到注入分机的方法 . property作为s... -
1 votesanswersviews
在Vaadin Gradle项目中升级Spring Boot版本时出错
我有一个使用Spring Boot Vaadin的Gradle项目 . Spring Boot和Vaadin的Gradle插件配置如下: buildscript { ext { springBootVersion = '1.3.7.RELEASE' } ... dependencies { classpath "org.s... -
0 votesanswersviews
无法使用gradle将spring-boot fat jar安装到maven存储库
我用gradle编写了一个spring-boot应用程序,它运行正常 . 我使用bootRepackage构建了一个胖jar,我添加了maven插件,所以我可以安装jar . 问题是我无法将胖jar安装到maven存储库 . "bootRepackage"构建那个胖jar文件 install依赖于"jar"阶段,因此它构建了一个覆盖胖jar文件的瘦j... -
2 votesanswersviews
Spring Boot 2 NoSuchMethodException:org.springframework.mobile.device.Device . <init>()
最近我尝试将我的Spring Boot应用程序版本从1.5.10.RELEASE更新到2.0.0.RELEASE Project Environment JDK版本1.8Gradle中的 jcenter()存储库 IDE Spring工具套件(STS)版本:3.9.2 我遇到过两个问题 我在下面得到了完成问题 . 无法解析配置':compileClasspath'的所有文件 ... -
1 votesanswersviews
Spring Boot替代方式来封装微服务(不是jar中的jar)
我分析了我们的应用程序性能,发现我们打包Spring启动应用程序的方式存在问题(我们只是做 gradle bootRepackage ) . Sun WS实现认为从类路径读取内容很便宜(它们不进行任何缓存!)和应用程序花费大量时间来搜索和读取 zip of zip 档案中的资源 . 问题的例子是spring-boot-starter-ws performance when run as jar 如... -
19 votesanswersviews
多模块Spring Boot项目中的Gradle依赖插件
在使用Gradle插件 spring-boot-dependencies 和 spring-boot 的多模块项目中,正确的Gradle配置是什么样的? 我有以下项目设置: parent | + build.gradle | + alpha | | | + build.gradle | + beta | | | + build.gradle ...