Fork me on GitHub

jfinal 学习笔记

       使用自带的jetty-server-8.1.8.jar时,访问jsp报错,提示ClassNotFoundException: javax.el.ELResolver

      解决方法:改用tomcat启动,pom.xml配置

<plugin>
    	<groupId>org.codehaus.mojo</groupId>
    	<artifactId>tomcat-maven-plugin</artifactId>
    	<version>1.2-SNAPSHOT</version>
    	<configuration>
      	<path>/jfinal_demo</path>
      	<port>8080</port>
      	<uriEncoding>UTF-8</uriEncoding>
    	</configuration>
</plugin>




----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

使用GeneratorDemo生成代码时,默认路径是在src\main\webapp下,如果要生成在src\main\java下,做如下修改

// base model 所使用的包名
String baseModelPackageName = "com.demo.base";
// base model 文件保存路径
String rootPath = PathKit.getWebRootPath();
String javaPath = rootPath.replace("webapp", "java");

String baseModelOutputDir = javaPath + "\\com\\demo\\base";

// model 所使用的包名 (MappingKit 默认使用的包名)
String modelPackageName = "com.demo.model";
// model 文件保存路径 (MappingKit 与 DataDictionary 文件默认保存路径)
String modelOutputDir = javaPath + "\\com\\demo\\model";

modelPackageName中存放的是model类的路径,baseModelPackaeName中存放的是实体累继承的BaseModel类,可以实现get,set方法




----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

02.19 update

jfinal整合redis,jdk环境必须是1.7才支持

通过maven插件tomcat启动项目时,需要修改maven build的jre为1.7,修改方法为在Run Configurations-JRE中进行修改



posted @ 2016-01-18 15:59  夏天海岸线  阅读(198)  评论(0编辑  收藏  举报