jfinal3.1切换到jfinal3.5后,项目启动就失败了,查看了一下,是jfinal在initActionMapping的时候,有重复的actionkey发生。
后来跟踪代码,看到,
protected void buildActionMapping() {
mapping.clear();
Set<String> excludedMethodName = buildExcludedMethodName();
InterceptorManager interMan = InterceptorManager.me();
for (Routes routes : getRoutesList()) {
for (Route route : routes.getRouteItemList()) {
Class<? extends Controller> controllerClass = route.getControllerClass();
Interceptor[] controllerInters = interMan.createControllerInterceptor(controllerClass);
在buildExcludeMethodName里,会把Controller基类的方法都去除。
而我的项目的controller是扩展了jfinal_ext里的ControllerExt基类。在ControllerExt基类里,定义了getFileSaveToDatePath等不同参数类型的方法,
protected void buildActionMapping() {
mapping.clear();
Set<String> excludedMethodName = buildExcludedMethodName();
InterceptorManager interMan = InterceptorManager.me();
for (Routes routes : getRoutesList()) {
for (Route route : routes.getRouteItemList()) {
Class<? extends Controller> controllerClass = route.getControllerClass();
Interceptor[] controllerInters = interMan.createControllerInterceptor(controllerClass);
boolean sonOfController = (controllerClass.getSuperclass() == Controller.class);
Method[] methods = (sonOfController ? controllerClass.getDeclaredMethods() : controllerClass.getMethods());
for (Method method : methods) {
String methodName = method.getName();
if (excludedMethodName.contains(methodName) /* || method.getParameterTypes().length != 0 */)
continue ;
if (sonOfController && !Modifier.isPublic(method.getModifiers()))
continue ;
if (method.getAnnotation(NotAction.class) != null)
但是在3.5因为action也允许有参数注入了,所以这个地方把getParameterTypes()这个条件注释掉了,导致buildActionMapping失败。
相关推荐
jfinal试验项目,jfinal crud简单的数据库操作
基础jfinal_demo
JFinal_Blog是基于JFinal1.5开源系统搭建的博客系统,以91zcm.com 网站作为模板和演示demo,目前已经加入了OSC开源项目和Github。 一、V2.0 版本新增功能点及bug修复情况: 1、添加百度Ping服务; 2、添加百度...
JFinal_Blog是基于JFinal1.5开源系统搭建的博客系统,以91zcm.com 网站作为模板和演示demo,目前已经加入了OSC开源项目和Github。 一、V2.0 版本新增功能点及bug修复情况: 1、添加百度Ping服务; 2、添加百度...
JFinal_Blog是基于JFinal1.5开源系统搭建的博客系统,以91zcm.com 网站作为模板和演示事例,目前已经加入了开源行列。 JFinal_Blog 1.1版本发布新增功能点: 1、将数据库连接池由C3P0升级为Druid实现; 2、废弃WEB-...
Jfinal_fastDev开发基础骨架留存,仅做个人网络备份 Jfinal_fastDev开发基础骨架留存,仅做个人网络备份
jfinal模板,树形菜单功能,希望大家多提提意见,再次感谢大家
jfinal_layui增删改查分页 界面优美,注释清晰欢迎下载
http://code.taobao.org/svn/jfinal_name/
jfinal-ext2提供了jfinal很多更加简便的操作及功能,方便了广大开发人员
JFinal框架配置,简单实现,oracle数据库
jfinal manual 3.2, jfinal最新手册
Jfinal-ext是对java极速web框架 jfinal 的一个扩充,主要利用jfinal微内核高扩展的特性扩展常用的实用功能和集成各种第三方框架,简化开发者的学习应用成本,为您节约更多时间,去陪恋人、家人和朋友 。 使用时请...
jfinal-ext-3.1.jar集成了jfinal的插件类
JFinal Weixin 是基于 JFinal 的微信公众号极速开发 SDK,只需浏览 Demo 代码即可进行极速开发,自 JFinal Weixin 1.2 版本开始已添加对多公众号支持。
提供了jfinal框架的一个简单的Demo,实现jfinal+jsp。不过个人觉得jfinal其实更适合搭配html使用
jfinal操作数据库及jsp页面,jfinal使用与传统SSH、SSM比较的优势及缺点
jfinal+quartz定时任务,jfinal+quartz定时任务,jfinal+quartz定时任务
这是一个可运行的jfinal小程序,有利于初学者快速了解jfinal框架,希望能方便大家的学习。
JFinal_Blog是基于JFinal1.5开源系统搭建的博客系统,以91zcm.com 网站作为模板和演示事例,目前已经加入了开源行列。