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
b0ffe18e
Commit
b0ffe18e
authored
May 03, 2017
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.5.x'
parents
88b2fed3
ea33cc2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
120 deletions
+0
-120
MustacheCompilerFactoryBean.java
...t/autoconfigure/mustache/MustacheCompilerFactoryBean.java
+0
-120
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mustache/MustacheCompilerFactoryBean.java
deleted
100644 → 0
View file @
88b2fed3
/*
* Copyright 2012-2015 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org
.
springframework
.
boot
.
autoconfigure
.
mustache
;
import
com.samskivert.mustache.Mustache
;
import
com.samskivert.mustache.Mustache.Collector
;
import
com.samskivert.mustache.Mustache.Compiler
;
import
com.samskivert.mustache.Mustache.Escaper
;
import
com.samskivert.mustache.Mustache.Formatter
;
import
com.samskivert.mustache.Mustache.TemplateLoader
;
import
org.springframework.beans.factory.FactoryBean
;
/**
* Factory for a Mustache compiler with custom strategies. For building a {@code @Bean}
* definition in Java it probably doesn't help to use this factory since the underlying
* fluent API is actually richer.
*
* @author Dave Syer
* @since 1.2.2
* @see MustacheResourceTemplateLoader
*/
public
class
MustacheCompilerFactoryBean
implements
FactoryBean
<
Mustache
.
Compiler
>
{
private
String
delims
;
private
TemplateLoader
templateLoader
;
private
Formatter
formatter
;
private
Escaper
escaper
;
private
Collector
collector
;
private
Compiler
compiler
;
private
String
defaultValue
;
private
Boolean
emptyStringIsFalse
;
public
void
setDelims
(
String
delims
)
{
this
.
delims
=
delims
;
}
public
void
setTemplateLoader
(
TemplateLoader
templateLoader
)
{
this
.
templateLoader
=
templateLoader
;
}
public
void
setFormatter
(
Formatter
formatter
)
{
this
.
formatter
=
formatter
;
}
public
void
setEscaper
(
Escaper
escaper
)
{
this
.
escaper
=
escaper
;
}
public
void
setCollector
(
Collector
collector
)
{
this
.
collector
=
collector
;
}
public
void
setDefaultValue
(
String
defaultValue
)
{
this
.
defaultValue
=
defaultValue
;
}
public
void
setEmptyStringIsFalse
(
Boolean
emptyStringIsFalse
)
{
this
.
emptyStringIsFalse
=
emptyStringIsFalse
;
}
@Override
public
Mustache
.
Compiler
getObject
()
throws
Exception
{
this
.
compiler
=
Mustache
.
compiler
();
if
(
this
.
delims
!=
null
)
{
this
.
compiler
=
this
.
compiler
.
withDelims
(
this
.
delims
);
}
if
(
this
.
templateLoader
!=
null
)
{
this
.
compiler
=
this
.
compiler
.
withLoader
(
this
.
templateLoader
);
}
if
(
this
.
formatter
!=
null
)
{
this
.
compiler
=
this
.
compiler
.
withFormatter
(
this
.
formatter
);
}
if
(
this
.
escaper
!=
null
)
{
this
.
compiler
=
this
.
compiler
.
withEscaper
(
this
.
escaper
);
}
if
(
this
.
collector
!=
null
)
{
this
.
compiler
=
this
.
compiler
.
withCollector
(
this
.
collector
);
}
if
(
this
.
defaultValue
!=
null
)
{
this
.
compiler
=
this
.
compiler
.
defaultValue
(
this
.
defaultValue
);
}
if
(
this
.
emptyStringIsFalse
!=
null
)
{
this
.
compiler
=
this
.
compiler
.
emptyStringIsFalse
(
this
.
emptyStringIsFalse
);
}
return
this
.
compiler
;
}
@Override
public
Class
<?>
getObjectType
()
{
return
Mustache
.
Compiler
.
class
;
}
@Override
public
boolean
isSingleton
()
{
return
false
;
}
}
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