结果就报错误了,项目还没启动完毕不能使用这个方法吗
11 回复
没有什么信息啊
2017-12-07 19:46:32 [org.nutz.ioc.impl.NutIoc]-[DEBUG] Get 'conf'<>
2017-12-07 19:46:32 [org.nutz.ioc.impl.NutIoc]-[DEBUG] Get 'jedisPoolConfig'<>
2017-12-07 19:46:32 [org.nutz.ioc.impl.NutIoc]-[DEBUG] Get 'conf'<>
2017-12-07 19:46:32 [org.nutz.ioc.impl.NutIoc]-[DEBUG] Get 'conf'<>
2017-12-07 19:46:32 [org.nutz.ioc.impl.NutIoc]-[DEBUG] Get 'conf'<>
2017-12-07 19:46:32 [org.nutz.ioc.impl.NutIoc]-[DEBUG] Get 'conf'<>
2017-12-07 19:46:32 [org.nutz.ioc.impl.NutIoc]-[DEBUG] Get 'conf'<>
[INFO] Started ServerConnector@5e24592e{HTTP/1.1,[http/1.1]}{0.0.0.0:8082}
[INFO] Jetty server exiting.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.220 s
[INFO] Finished at: 2017-12-07T19:46:32+08:00
[INFO] Final Memory: 23M/264M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.4.6.v20170531:run (default-cli) on project xhd-shop-app: Execution default-cli of goal org.eclipse.jetty:jetty-maven-plugin:9.4.6.v20170531:run failed: A required class was missing while executing org.eclipse.jetty:jetty-maven-plugin:9.4.6.v20170531:run: org/json/JSONObject
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.eclipse.jetty:jetty-maven-plugin:9.4.6.v20170531
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/guojx/.m2/repository/org/eclipse/jetty/jetty-maven-plugin/9.4.6.v20170531/jetty-maven-plugin-9.4.6.v20170531.jar
[ERROR] urls[1] = file:/C:/Users/guojx/.m2/repository/org/sonatype/sisu/sisu-inject-bean/2.1.1/sisu-inject-bean-2.1.1.jar
[ERROR] urls[2] = file:/C:/Users/guojx/.m2/repository/org/sonatype/sisu/sisu-guice/2.9.4/sisu-guice-2.9.4-no_aop.jar
[ERROR] urls[3] = file:/C:/Users/guojx/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.6/plexus-utils-2.0.6.jar
[ERROR] urls[4] = file:/C:/Users/guojx/.m2/repository/org/sonatype/aether/aether-util/1.11/aether-util-1.11.jar
[ERROR] urls[5] = file:/C:/Users/guojx/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[6] = file:/C:/Users/guojx/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[7] = file:/C:/Users/guojx/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[8] = file:/C:/Users/guojx/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[9] = file:/C:/Users/guojx/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/3.4/maven-plugin-tools-api-3.4.jar
[ERROR] urls[10] = file:/C:/Users/guojx/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[11] = file:/C:/Users/guojx/.m2/repository/org/eclipse/jetty/jetty-util/9.4.6.v20170531/jetty-util-9.4.6.v20170531.jar
...
public class APPSetup implements Setup {
private static final Log log = Logs.get();
@Override
public void init(NutConfig nc) {
/**检查当前项目环境是否为utf-8*/
if (!Charset.defaultCharset().name().equalsIgnoreCase(Encoding.UTF8)) {
log.error("This project must running in utf-8,please modify encoding = utf-8");
}
Ioc ioc = nc.getIoc();
Dao dao = ioc.get(Dao.class);
Daos.createTablesInPackage(dao,"com.xhd.shop",false);
Daos.migration(dao,"com.xhd.shop",true,true);
// 参数初始化
InitData init = new InitData(ioc);
init.initStoreAddress();
}
@Override
public void destroy(NutConfig nutConfig) {
}
}
添加回复
请先登陆