Explorar el Código

BaseController多视图返回

shuzheng hace 9 años
padre
commit
cfb3105916

+ 1 - 1
zheng-common/src/main/java/com/zheng/common/base/BaseController.java

@@ -59,7 +59,7 @@ public abstract class BaseController {
 	 */
 	public static String thymeleaf(String path) {
 		String folder = PropertiesFileUtil.getInstance().get("app.name");
-		return File.separator.concat(folder).concat(path);
+		return "/".concat(folder).concat(path).concat(".html");
 	}
 
 }

+ 0 - 10
zheng-common/src/main/resources/springMVC-servlet.xml

@@ -36,16 +36,6 @@
         </mvc:message-converters>
     </mvc:annotation-driven>
 
-    <!-- Jsp视图 -->
-    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
-        <property name="order" value="1"/>
-        <property name="viewNames" value="*.jsp"/>
-        <property name="prefix" value="/WEB-INF/jsp"/>
-        <property name="suffix" value=""/>
-        <property name="contentType" value="text/html; charset=utf-8"/>
-        <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
-    </bean>
-
     <!-- i18n国际化 -->
     <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
         <!-- 找不到key时用key作为返回值 -->