JavaActiveJDBC如何定义模型
您正在尝试使用模型,但找不到模型。可能您在项目中没有模型,或者您没有为模型添加仪器。您应该有一个activejdbc_models文件。类路径上的属性
Caused by: activejdbc.InitException: you are trying to work with models, but no models are found. Maybe you have no models in project, or you did not instrument the models. It is expected that you have a file activejdbc_models.properties on classpath
at activejdbc.ModelFinder.findModels(ModelFinder.java:46)
at activejdbc.Registry.init(Registry.java:97)
at activejdbc.Model.<clinit>(Model.java:53)
... 2 more
谢谢
# 1 楼答案
这一点已经得到回答: Can't get activejdbc working?
基本上,编译后缺少一个插装步骤。如果您使用的是Maven,请参见以下简单示例:https://github.com/javalite/simple-example
如果您使用的是Ant,请参见:https://github.com/javalite/ant-example 参考: http://javalite.io/getting_started
谢谢