{"id":68,"date":"2011-08-29T21:46:52","date_gmt":"2011-08-29T21:46:52","guid":{"rendered":"http:\/\/devblog.cssec.de\/?p=68"},"modified":"2020-10-25T14:11:08","modified_gmt":"2020-10-25T14:11:08","slug":"wicket-und-spring","status":"publish","type":"post","link":"https:\/\/www.cssec.de\/blog\/2011\/08\/29\/wicket-und-spring\/","title":{"rendered":"Wicket und Spring"},"content":{"rendered":"<p>Wicket besitzt die M\u00f6glichkeit, Spring-Beans \u00fcber das Spring-Integration-Package direkt als Annotation einzubetten.<br \/>\nDamit das funktioniert, muss allerdings unbedingt die init-Methode der Webapplication \u00fcberschrieben werden.<br \/>\nDabei muss ein SpringComponentInjector als InstantiationListener registiert werden.<br \/>\nDas passiert so:<\/p>\n<pre lang=\"java\">@Override\r\nprotected void init() {\r\n  super.init();\r\n  addComponentInstantiationListener(new SpringComponentInjector(this));\r\n}\r\n<\/pre>\n<p>Auf der Page k\u00f6nnen dann die Spring-Beans mit @SpringBean injected werden.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Wicket besitzt die M\u00f6glichkeit, Spring-Beans \u00fcber das Spring-Integration-Package direkt als Annotation einzubetten. Damit das funktioniert, muss allerdings unbedingt die init-Methode der Webapplication \u00fcberschrieben werden. Dabei muss ein SpringComponentInjector als InstantiationListener registiert werden. Das passiert so: @Override protected void init() { super.init(); addComponentInstantiationListener(new SpringComponentInjector(this)); } Auf der Page k\u00f6nnen dann die Spring-Beans mit @SpringBean injected werden.<\/p>\n","protected":false},"author":1,"featured_media":551,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/www.cssec.de\/blog\/wp-json\/wp\/v2\/posts\/68"}],"collection":[{"href":"https:\/\/www.cssec.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cssec.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cssec.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cssec.de\/blog\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":1,"href":"https:\/\/www.cssec.de\/blog\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":69,"href":"https:\/\/www.cssec.de\/blog\/wp-json\/wp\/v2\/posts\/68\/revisions\/69"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cssec.de\/blog\/wp-json\/wp\/v2\/media\/551"}],"wp:attachment":[{"href":"https:\/\/www.cssec.de\/blog\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cssec.de\/blog\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cssec.de\/blog\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}