vFabric tc サーバーを使用して Spring Tool Suite (STS) 内に Web アプリをデプロイしようとしていますが、例外が発生します。スタンドアロンの Tomcat 6 でコンパイルして実行すると問題なく動作することは注目に値します。
エラーは次のとおりです。
java.lang.IllegalArgumentException: class [springapp.web.spring.MyInitializer] must implement ApplicationContextInitializerclass springapp.web.spring.MyInitializer is not assignable to interface org.springframework.context.ApplicationContextInitializer
イニシャライザが実装しているため、このエラーが発生する理由を解読できませんApplicationContextInitializer
。
public class MyInitializer implements ApplicationContextInitializer {
public void initialize(ConfigurableApplicationContext ctx) {
try {
PropertySource ps = new ResourcePropertySource("file:///home/jim/development/act/impact/webapp.properties");
ctx.getEnvironment().getPropertySources().addFirst(ps);
// perform any other initialization of the context ...
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
これを実行するために私ができることについて何か提案はありますか?