Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
759a55d3
Commit
759a55d3
authored
Jan 31, 2014
by
Matija Obreza
Browse files
VelocityEngine needs configuration
parent
1103e104
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/service/impl/ContentServiceImpl.java
View file @
759a55d3
...
...
@@ -27,6 +27,7 @@ import org.apache.commons.logging.Log;
import
org.apache.commons.logging.LogFactory
;
import
org.apache.velocity.VelocityContext
;
import
org.apache.velocity.app.Velocity
;
import
org.apache.velocity.app.VelocityEngine
;
import
org.genesys2.server.model.EntityId
;
import
org.genesys2.server.model.impl.ActivityPost
;
import
org.genesys2.server.model.impl.Article
;
...
...
@@ -62,6 +63,10 @@ public class ContentServiceImpl implements ContentService {
@Autowired
private
HtmlSanitizer
htmlSanitizer
;
@Autowired
private
VelocityEngine
velocityEngine
;
@Override
public
Locale
getDefaultLocale
()
{
return
Locale
.
getDefault
();
...
...
@@ -268,7 +273,7 @@ public class ContentServiceImpl implements ContentService {
/**
* Merge data and template
*/
V
elocity
.
evaluate
(
context
,
swOut
,
"log tag name"
,
templateStr
);
v
elocity
Engine
.
evaluate
(
context
,
swOut
,
"log tag name"
,
templateStr
);
System
.
out
.
println
(
swOut
);
return
swOut
.
toString
();
}
...
...
src/main/resources/spring/spring-mail.xml
View file @
759a55d3
...
...
@@ -39,4 +39,15 @@
</property>
</bean>
<bean
id=
"velocityEngine"
class=
"org.springframework.ui.velocity.VelocityEngineFactoryBean"
>
<property
name=
"velocityProperties"
>
<value>
resource.loader=class
class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
velocimacro.permissions.allow.inline.local.scope
runtime.log.logsystem.log4j.logger=velocity
runtime.log.logsystem.class=org.apache.velocity.runtime.log.Log4JLogChute
</value>
</property>
</bean>
</beans>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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