英文:
Caused by: com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes
问题
我正在尝试使用IntelliJ创建Gradle/DropWizard(JDK 1.8)应用程序
尝试运行时出现以下错误:
Caused by: com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
以下是完整的代码:
package org.xx.udemy;
import io.dropwizard.Application;
import io.dropwizard.Configuration;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
public class DropWizApp extends Application<Configuration> {
@Override
public void initialize(Bootstrap<Configuration> bootstrap) {
}
@Override
public void run(Configuration configuration, Environment environment) throws Exception {
System.out.println("Hello DropWiz!");
}
public static void main(String ...args) throws Exception{
new DropWizApp().run(args);
}
}
英文:
I am trying to create Gradle/DropWizard (JDK 1.8) application using IntelliJ
When attempting to run I receive:
Caused by: com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
Below is a complete code:
package org.xx.udemy;
import io.dropwizard.Application;
import io.dropwizard.Configuration;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
public class DropWizApp extends Application<Configuration> {
@Override
public void initialize(Bootstrap<Configuration> bootstrap) {
}
@Override
public void run(Configuration configuration, Environment environment) throws Exception {
System.out.println("Hello DropWiz!");
}
public static void main(String ...args) throws Exception{
new DropWizApp().run(args);
}
}
答案1
得分: 0
升级Dropwizard的版本解决了这个问题。
英文:
Upgrading dropwizard's version solved the problem.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论