freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [08/16] incubator-freemarker git commit: FREEMARKER-55: Adding FreemarkerViewResolver
Date Tue, 04 Jul 2017 07:44:19 GMT
FREEMARKER-55: Adding FreemarkerViewResolver


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/83e896c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/83e896c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/83e896c0

Branch: refs/heads/3
Commit: 83e896c01ebe2fd3fa5b0997f6ee177ccbeed2f5
Parents: c2589ee
Author: Woonsan Ko <woonsan@apache.org>
Authored: Thu Jun 29 23:56:20 2017 -0400
Committer: Woonsan Ko <woonsan@apache.org>
Committed: Thu Jun 29 23:56:20 2017 -0400

----------------------------------------------------------------------
 .../spring/web/view/FreemarkerViewResolver.java | 40 ++++++++++++++++++++
 1 file changed, 40 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/83e896c0/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/FreemarkerViewResolver.java
----------------------------------------------------------------------
diff --git a/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/FreemarkerViewResolver.java
b/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/FreemarkerViewResolver.java
new file mode 100644
index 0000000..6d7ab40
--- /dev/null
+++ b/freemarker-spring/src/main/java/org/apache/freemarker/spring/web/view/FreemarkerViewResolver.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.freemarker.spring.web.view;
+
+import org.springframework.web.servlet.view.AbstractTemplateViewResolver;
+
+public class FreemarkerViewResolver extends AbstractTemplateViewResolver {
+
+    public FreemarkerViewResolver() {
+        setViewClass(requiredViewClass());
+    }
+
+    public FreemarkerViewResolver(String prefix, String suffix) {
+        this();
+        setPrefix(prefix);
+        setSuffix(suffix);
+    }
+
+    @Override
+    protected Class<?> requiredViewClass() {
+        return FreemarkerView.class;
+    }
+
+}


Mime
View raw message