jfinal 和snaker整合

_过路人 发布于 2015/05/22 16:17
阅读 1K+
收藏 0

@Dead_knight 先生,您好,我是一个初学者,第一次使用框架,接触jfinal两周,用起来还是挺爽的,但是在整合snaker的时候遇到问题,我按着snaker文档上所写,加入所有核心包和依赖包,在

public void configPlugin(Plugins me) {// 添加插件

C3p0Plugin c3p0Plugin = new C3p0Plugin(getProperty("jdbcUrl"), getProperty("user"), getProperty("password").trim()); 
me.add(c3p0Plugin); 
ActiveRecordPlugin arp = new ActiveRecordPlugin(c3p0Plugin); 
me.add(arp); 
//...........
SnakerPlugin snakerPlugin = new SnakerPlugin(c3p0Plugin,this.prop.getProperties());
   me.add(snakerPlugin);

}中加入了snaker插件,启动项目不报任何错误,但是数据库中并未初始化数据表,请问我哪里出现了问题,还是说我的整合不完全,下面是项目启动的一些信息:

2015-05-22 15:56:48,291 [localhost-startStop-1] INFO  [com.mchange.v2.log.MLog] - MLog clients using log4j logging.
2015-05-22 15:56:48,324 [localhost-startStop-1] INFO  [com.mchange.v2.c3p0.C3P0Registry] - Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
2015-05-22 15:56:48,325 [localhost-startStop-1] WARN  [com.mchange.v2.c3p0.management.ActiveManagementCoordinator] - A C3P0Registry mbean is already registered. This probably means that an application using c3p0 was undeployed, but not all PooledDataSources were closed prior to undeployment. This may lead to resource leaks over time. Please take care to close all PooledDataSources.
2015-05-22 15:56:48,418 [localhost-startStop-1] INFO  [com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource] - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 2, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge19c99y0v1vbv398x|1dd1e5b, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge19c99y0v1vbv398x|1dd1e5b, idleConnectionTestPeriod -> 0, initialPoolSize -> 10, jdbcUrl -> jdbc:mysql://localhost:3308/db_oa?useUnicode=true&characterEncoding=utf-8, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 20, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 100, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 10, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
2015-05-22 15:56:48,795 [localhost-startStop-1] INFO  [org.snaker.engine.cfg.Configuration] - SnakerEngine start......
2015-05-22 15:56:48,809 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=org.snaker.jfinal.access.JfinalAccess][clazz=org.snaker.jfinal.access.JfinalAccess]
2015-05-22 15:56:48,817 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=org.snaker.jfinal.access.JfinalTransactionInterceptor][object=org.snaker.jfinal.access.JfinalTransactionInterceptor@78d31a]
2015-05-22 15:56:48,818 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=org.snaker.engine.access.dialect.MySqlDialect][clazz=org.snaker.engine.access.dialect.MySqlDialect]
2015-05-22 15:56:48,821 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=start][clazz=org.snaker.engine.parser.impl.StartParser]
2015-05-22 15:56:48,824 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=task][clazz=org.snaker.engine.parser.impl.TaskParser]
2015-05-22 15:56:48,827 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=custom][clazz=org.snaker.engine.parser.impl.CustomParser]
2015-05-22 15:56:48,828 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=decision][clazz=org.snaker.engine.parser.impl.DecisionParser]
2015-05-22 15:56:48,829 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=subprocess][clazz=org.snaker.engine.parser.impl.SubProcessParser]
2015-05-22 15:56:48,830 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=fork][clazz=org.snaker.engine.parser.impl.ForkParser]
2015-05-22 15:56:48,832 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=join][clazz=org.snaker.engine.parser.impl.JoinParser]
2015-05-22 15:56:48,833 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=end][clazz=org.snaker.engine.parser.impl.EndParser]
2015-05-22 15:56:48,957 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=org.snaker.engine.core.ManagerService][object=org.snaker.engine.core.ManagerService$$EnhancerByCGLIB$$529ba00d@10cc38]
2015-05-22 15:56:48,974 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=org.snaker.engine.core.ProcessService][object=org.snaker.engine.core.ProcessService$$EnhancerByCGLIB$$56a3c457@1877a52]
2015-05-22 15:56:48,995 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=org.snaker.engine.core.QueryService][object=org.snaker.engine.core.QueryService$$EnhancerByCGLIB$$c0ae4d14@fa3735]
2015-05-22 15:56:49,011 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=org.snaker.engine.core.TaskService][object=org.snaker.engine.core.TaskService$$EnhancerByCGLIB$$bd672e37@f3277]
2015-05-22 15:56:49,022 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=org.snaker.engine.core.OrderService][object=org.snaker.engine.core.OrderService$$EnhancerByCGLIB$$7b3dd532@8c134a]
2015-05-22 15:56:49,033 [localhost-startStop-1] INFO  [org.snaker.engine.core.ServiceContext] - put new instance[name=org.snaker.engine.core.SnakerEngineImpl][object=org.snaker.engine.core.SnakerEngineImpl$$EnhancerByCGLIB$$3db4d091@1160037]
2015-05-22 15:56:49,034 [localhost-startStop-1] INFO  [org.snaker.engine.cfg.Configuration] - SnakerEngine be found:class org.snaker.engine.core.SnakerEngineImpl$$EnhancerByCGLIB$$3db4d091
问题很小白,让您见笑了,敬待回复

加载中
0
Dead_knight
Dead_knight
需要增加脚本自动执行的插件:
ScriptsPlugin scriptsPlugin = new ScriptsPlugin(c3p0Plugin);
me.add(scriptsPlugin);
参考jfaker项目
0
_
_过路人

引用来自“Dead_knight”的评论

需要增加脚本自动执行的插件:
ScriptsPlugin scriptsPlugin = new ScriptsPlugin(c3p0Plugin);
me.add(scriptsPlugin);
参考jfaker项目
谢谢,已解决,继续学习中
返回顶部
顶部