# fast-jfinal
**Repository Path**: jfinal/fast-jfinal
## Basic Information
- **Project Name**: fast-jfinal
- **Description**: jfinal项目以embed-tomcat或undertow的方式运行,无须打war包,无续部署tomcat
- **Primary Language**: Java
- **License**: Not specified
- **Default Branch**: v1.0.3
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 2
- **Forks**: 6
- **Created**: 2018-07-24
- **Last Updated**: 2021-03-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# fast-jfinal
jfinal项目以embed-tomcat或undertow的方式运行,无须打war包,无续部署tomcat
用appassembler-maven-plugin打包,然后运行bin目录中的脚本即可。
具体参见demo项目:[fast-jfinal-demo](https://github.com/piaohao/fast-jfinal-demo)
### 1.pom.xml
引入
````
org.piaohao
fast-jfinal
1.0.3
````
加入appassembler打包插件
````
org.codehaus.mojo
appassembler-maven-plugin
1.10
windows
unix
${project.build.directory}/${project.name}
lib
bin
webapp
true
src/main/resources
flat
UTF-8
logs
tmp
${project.name}-${project.version}
org.piaohao.fast.jfinal.Bootstrap
-server
-Xmx200M
-Xms200M
````
### 2.fast-jfinal.properties
````
server.port=8080 #启动端口
server.type=tomcat #或者undertow,不指定的情况下,以undertow运行
server.context.path=/ #项目上下文路径
tomcat.base.dir=/tmp/tomcat #tomcat临时文件目录,可不设置
jfinal.config.class=org.piaohao.fast.jfinal.demo.DemoConfig #JfinalConfig配置类
````
### 3.JFinalConfig
````
PathKit.setWebRootPath("WEB-INF/view"); //设置web视图根路径,放在resources目录下
````
````
engine.setSourceFactory(new ClassPathSourceFactory()); //设置jfinal模板引擎的工厂
````