Я использую контекст Wicket with Spring в моем веб-приложении.У меня есть класс BasePage с полем:
@SpringBean(name="epfc")
protected ExternalPropertiesFileConfig externalPropertiesFileConfig;
и все другие страницы расширены с этой страницы.
Также я использую KryoSerializer в своей калитке:
KryoSerializer ser = new KryoSerializer(Bytes.megabytes(1L));
getFrameworkSettings().setSerializer(ser);
иAnnotationConfigWebApplicationContext как rootContext в приложении Wicket
AnnotationConfigWebApplicationContext rootContext = new AnnotationConfigWebApplicationContext();
//Beans definitions (annotations)
rootContext.register(ApplicationConfig.class);
//install Spring Context for spring dependency injection
getServletContext().setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, rootContext);
SpringComponentInjector springComponentInjector = new SpringComponentInjector(this , rootContext, true);
getComponentInstantiationListeners().add(springComponentInjector);
А вот некоторая информация из моего класса ExternalPropertiesFileConfig:
public class ExternalPropertiesFileConfig {
private Properties prop;
private IResource logo;
//constructor
public ExternalPropertiesFileConfig() {
Plugin plugin = Bukkit.getPluginManager().getPlugin("MinecraftWebService");
File pluginDir = plugin.getDataFolder();
loadFileToPropertiesObject(pluginDir);
loadImgFile(pluginDir);
}
}
Все работает хорошо.Но вот некоторые проблемы: например, я сейчас на HomePage, и я нажимаю на ссылку и перенаправляем на LoginPage.Таким образом, HomePage должен быть сериализован.Нет проблем.Но когда я нажимаю НАЗАД КНОПКУ В МОЕМ БРАУЗЕРЕ - появляются некоторые ошибки: Stack Trace слишком велик, поэтому он хранится здесь: https://hastebin.com/oduyutekiv.sql