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
8e3d63ab
Commit
8e3d63ab
authored
Jan 25, 2016
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish contribution
Closes gh-4632
parent
d7968456
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
13 deletions
+6
-13
JspTemplateAvailabilityProvider.java
...ot/autoconfigure/web/JspTemplateAvailabilityProvider.java
+1
-1
JspTemplateAvailabilityProviderTests.java
...toconfigure/web/JspTemplateAvailabilityProviderTests.java
+5
-12
custom.jsp
...oconfigure/src/test/resources/custom-templates/custom.jsp
+0
-0
suffixed.jsp
...onfigure/src/test/resources/custom-templates/suffixed.jsp
+0
-0
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/JspTemplateAvailabilityProvider.java
View file @
8e3d63ab
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
spring-boot-
samples/spring-boot-sample-actuator-ui/src/test/java/org/springframework/boot/autoconfigure/web/JspTemplateAvailabilityProviderTest
.java
→
spring-boot-
autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/JspTemplateAvailabilityProviderTests
.java
View file @
8e3d63ab
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -17,7 +17,7 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
web
;
import
org.junit.Test
;
import
org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider
;
import
org.springframework.core.io.DefaultResourceLoader
;
import
org.springframework.core.io.ResourceLoader
;
import
org.springframework.mock.env.MockEnvironment
;
...
...
@@ -30,8 +30,9 @@ import static org.junit.Assert.assertTrue;
*
* @author Yunkun Huang
*/
public
class
JspTemplateAvailabilityProviderTest
{
private
final
TemplateAvailabilityProvider
provider
=
new
JspTemplateAvailabilityProvider
();
public
class
JspTemplateAvailabilityProviderTests
{
private
final
JspTemplateAvailabilityProvider
provider
=
new
JspTemplateAvailabilityProvider
();
private
final
ResourceLoader
resourceLoader
=
new
DefaultResourceLoader
();
...
...
@@ -61,12 +62,4 @@ public class JspTemplateAvailabilityProviderTest {
getClass
().
getClassLoader
(),
this
.
resourceLoader
));
}
@Test
public
void
notAvailabilityOfTemplateWithCustomSuffixViaDeprecatedKey
()
{
this
.
environment
.
setProperty
(
"spring.mvc.view.prefix"
,
"classpath:/custom-templates/"
);
this
.
environment
.
setProperty
(
"spring.view.suffix"
,
".jsp"
);
assertFalse
(
this
.
provider
.
isTemplateAvailable
(
"suffixed"
,
this
.
environment
,
getClass
().
getClassLoader
(),
this
.
resourceLoader
));
}
}
spring-boot-
samples/spring-boot-sample-data-rest
/src/test/resources/custom-templates/custom.jsp
→
spring-boot-
autoconfigure
/src/test/resources/custom-templates/custom.jsp
View file @
8e3d63ab
File moved
spring-boot-
samples/spring-boot-sample-data-rest
/src/test/resources/custom-templates/suffixed.jsp
→
spring-boot-
autoconfigure
/src/test/resources/custom-templates/suffixed.jsp
View file @
8e3d63ab
File moved
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