Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
ffe91ca6
Commit
ffe91ca6
authored
Mar 05, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change exception message for missing Thymeleaf templates
Fixes gh-424
parent
6b83e0ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
ThymeleafAutoConfiguration.java
...t/autoconfigure/thymeleaf/ThymeleafAutoConfiguration.java
+5
-2
ThymeleafAutoConfigurationTests.java
...oconfigure/thymeleaf/ThymeleafAutoConfigurationTests.java
+2
-2
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafAutoConfiguration.java
View file @
ffe91ca6
...
...
@@ -84,8 +84,11 @@ public class ThymeleafAutoConfiguration {
if
(
checkTemplateLocation
)
{
Resource
resource
=
this
.
resourceLoader
.
getResource
(
this
.
environment
.
getProperty
(
"prefix"
,
DEFAULT_PREFIX
));
Assert
.
state
(
resource
.
exists
(),
"Cannot find template location: "
+
resource
+
" (are you really using Thymeleaf?)"
);
Assert
.
state
(
resource
.
exists
(),
"Cannot find template location: "
+
resource
+
" (please add some templates or check your Thymeleaf configuration)"
);
}
}
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafAutoConfigurationTests.java
View file @
ffe91ca6
...
...
@@ -16,11 +16,11 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
thymeleaf
;
import
java.io.File
;
import
java.util.Collections
;
import
java.util.Locale
;
import
org.junit.After
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.springframework.beans.factory.BeanCreationException
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
...
...
@@ -95,8 +95,8 @@ public class ThymeleafAutoConfigurationTests {
}
@Test
@Ignore
(
"Fix this for gh-424"
)
public
void
templateLocationEmpty
()
throws
Exception
{
new
File
(
"target/test-classes/templates/empty-directory"
).
mkdir
();
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.thymeleaf.prefix:classpath:/templates/empty-directory/"
);
this
.
context
.
register
(
ThymeleafAutoConfiguration
.
class
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment