- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
编辑:我已经缩小了行为范围,不确定是否有一种方法可以完成我所需要的。
事实证明,我的应用在源代码树中将Thymeleaf模板下移了一层:
src/main/resources/tools-server/templates
tools-server.yml
文件中进行设置,该文件会在应用程序启动时显式加载。从我的配置中删除该规范,并将
templates
目录上移至
src/main/resources/templates
spring-boot-devtools
简单地重新加载模板,而无需重新启动应用程序。我认为除非有解决办法,否则我将向该项目提交错误。
gradle.build
文件几乎相同,但依赖关系略有不同。我不确定这些差异是否会导致不同的行为。
buildscript
{
ext
{
springBootVersion = "1.4.3.RELEASE"
}
repositories
{
mavenCentral()
}
dependencies
{
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath group: "com.layer", name: "gradle-git-repo-plugin", version: "2.0.2"
}
}
apply plugin: "git-repo"
apply plugin: "java"
apply plugin: "maven"
apply plugin: "spring-boot"
jar
{
baseName = "HOA"
version = "0.0.1-SNAPSHOT"
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories
{
mavenCentral()
maven { url "https://maven.atlassian.com/3rdparty/" }
maven { url "https://mvnrepository.com/artifact/" }
maven { url "http://repo.spring.io/snapshot" }
maven { url "http://repo.spring.io/milestone" }
}
dependencies
{
compile group: "org.mindrot", name: "jbcrypt", version: "0.4-atlassian-1"
compile group: "org.eclipse.persistence", name: "javax.persistence", version: "2.1.1"
compile group: "org.springframework.data", name: "spring-data-jpa", version: "1.10.4.RELEASE"
compile group: "org.springframework.hateoas", name: "spring-hateoas", version: "0.21.0.RELEASE"
compile group: "com.h2database", name: "h2", version: "1.4.192"
compile("org.springframework.boot:spring-boot-devtools")
compile("org.springframework.boot:spring-boot-starter-aop")
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("org.springframework.boot:spring-boot-starter-groovy-templates")
compile("org.springframework.boot:spring-boot-starter-thymeleaf")
compile("org.springframework.boot:spring-boot-starter-web")
// Automated Testing
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("org.springframework.restdocs:spring-restdocs-mockmvc")
}
dependencyManagement
{
imports
{
mavenBom "org.springframework.cloud:spring-cloud-dependencies:Camden.SR1"
}
}
compileJava
{
options.compilerArgs << "-Xlint:all" << "-Xdiags:verbose"
}
bootRepackage
{
mainClass = "com.latencyzero.hoa.Application"
}
bootRun
{
addResources = true
}
buildscript
{
ext
{
springBootVersion = '1.4.3.RELEASE'
}
repositories
{
mavenCentral()
}
dependencies
{
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'org.springframework.boot'
sourceCompatibility = 1.8
targetCompatibility = 1.8
archivesBaseName = 'toolcrib'
compileJava
{
options.compilerArgs << "-Xlint:all" << "-Xdiags:verbose"
}
jar
{
manifest
{
attributes 'Implementation-Title': 'ToolCrib',
'Implementation-Version': version
}
}
repositories
{
mavenCentral()
}
dependencyManagement
{
imports
{
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Camden.SR3'
}
}
dependencies
{
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.0'
compile('org.springframework.boot:spring-boot-devtools')
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.boot:spring-boot-starter-thymeleaf')
runtime('org.postgresql:postgresql')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
springBoot
{
mainClass = "com.latencyzero.toolcrib.services.tools.ToolsServer"
}
bootRun
{
addResources = true
}
最佳答案
你有a look to the documentation吗
By default changing resources in /META-INF/maven, /META-INF/resources, /resources, /static, /public or /templates will not trigger a restart but will trigger a live reload.
If you want to customize these exclusions you can use the spring.devtools.restart.exclude
spring.devtools.restart.additional-exclude
可添加更多排除项并保留默认值。对于您的情况,应在配置中添加以下内容:
spring.devtools.restart.additional-exclude=classpath:/tools-server/templates/
关于gradle - 一个Gradle Thymeleaf项目根据资源变更重新加载,另一个重新启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41455936/
我有一个相当简单的 iPhone 应用程序,它将一组 UITableView 结果下载到其模型类中,以及一个设置为观察这些更改的 View Controller using KVO . 这个系统运行良
我们的一名团队成员(位于不同地区)已搁置 P4 中的更改,更改列表为 1234。 现在,如果我想查看 snf 修改了哪些文件,有哪些更改,我该怎么做? 我应该使用什么 P4 命令来查看我们的团队成员所
有没有办法获取特定分支的特定变更列表之后的变更列表列表? p4 changes (some flag ?) (CL#) //depot/project 最佳答案 这可以使用以下语法来完成(假设您想查看
我是 drupal 的新手,但学得很快。我有 drupal 7,我正在努力创建一个基于 Zen 的 starterkit 子主题的主题。我正在尝试找到可以自定义“提交者”行的位置。 默认情况如下: 由
我正在尝试将附件的 ShareKit API 代码更改为以下代码: dialog.attachment = [NSString stringWithFormat:@"{\"name\":\"%@\",
所以我的理解是,在 symfony 开发环境中,如果 use_controller 设置为 true,则 Assets 是通过 Controller 在页面加载时生成的。 然而,这非常耗时,并且将其设
我正在编写一个程序,它需要了解一台机器的所有 IP 地址,并且数据包通过它们的连接进行传输。我可以在运行主程序之前使用“gethostbyname”获取 IP 列表,但是如果之后有任何 IP 可用怎么
我很好奇是否有人可以概述服务器端哪些类型的 WCF 合约(接口(interface))更改会破坏尝试发送消息的客户端,以及原因。我相信 WCF 可以处理某些差异,但我不确定您可以安全地更改哪些内容以及
在 AngularJS 中,创建和使用自定义服务进行 DOM 操作并在 UI 的不同部分共享相同的功能是一种常见的做法,我的问题也与此案例相关,如下所示: 我的应用程序中有一个侧边栏组件和一个用于最小
我尝试使用像 WPF-MVVM 这样的 Knockout。 在 WPF 中,有一个选项可以在属性更改时通知虚拟机。 例如:如果我有一个文本框,我可以使用 UpdateSourceTrigger=Pro
我需要一些使用 Apollo 2.1 中新的查询和突变组件的帮助,尤其是多个查询和突变。 我有以下问题: 我有一个 graphql 请求,该请求依赖于之前的 graphql 结果,我该如何处理这个问题
Paypal 似乎已经改变了他们的 IPN 测试界面。 (将 IPN 欺骗到您的 IPN 页面以进行测试。 以下是我现在从IPN收到的数据。 KEY: receipt_ID - VALUE: KEY:
从雅虎财经请求数据似乎已经改变或现在被阻止。以下商品数据请求自 2017 年 5 月起不再有效。有谁知道是否有新的方式来提出此请求? http://chartapi.finance.yahoo.c
In this post他们在 LinkedIn 上提到开放 API 仍将支持与公司 API 共享内容,但如果您进一步查看他们的 Developer Program Transition Guide他
我对 Xcode 很陌生,我想在添加可能会破坏我的项目的更改之前弄清楚版本控制。我正在单独处理这个项目,并且在我的 mac 上保存了一个 Git 存储库,所以我认为我不需要将它与 GitHub 帐户链
我是一名优秀的程序员,十分优秀!