package config;
import com.jfinal.core.Controller;
/**
* Created by jaer on 2016/12/16.
*/publicclassAppControllerextendsController{publicvoidindex(){
renderText("Hello Maven JFinal");
}
}
1
2
3
4
5
6
7
8
9
10
11
12
web.xml配置
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" ><web-app><display-name>Archetype Created Web Application</display-name><filter><filter-name>jfinal</filter-name><filter-class>com.jfinal.core.JFinalFilter</filter-class><init-param><param-name>configClass</param-name><param-value>config.AppConfig</param-value></init-param></filter><filter-mapping><filter-name>jfinal</filter-name><url-pattern>/*</url-pattern></filter-mapping></web-app>
IDEA Maven JFinal环境搭建IDEA:2016JFinal:2.2一、新建项目选择maven创建,并使用模板Groupid:是公司域名反写Artifactid: 项目名在创建Maven项目时加上 archetypeCatalog=internal 参数,解决IntelliJ IDEA 创建Maven项目速度慢问题