{"id":16618012,"url":"https://github.com/marcgiffing/wicket-spring-boot","last_synced_at":"2025-04-14T06:04:07.613Z","repository":{"id":2253746,"uuid":"46081320","full_name":"MarcGiffing/wicket-spring-boot","owner":"MarcGiffing","description":"Spring Boot starter for Apache Wicket","archived":false,"fork":false,"pushed_at":"2024-10-16T18:01:56.000Z","size":1065,"stargazers_count":152,"open_issues_count":7,"forks_count":62,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-10-19T13:18:24.302Z","etag":null,"topics":["java","spring","spring-boot","spring-boot-starter","wicket"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarcGiffing.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-12T21:15:46.000Z","updated_at":"2024-10-16T18:02:01.000Z","dependencies_parsed_at":"2023-01-14T10:59:32.261Z","dependency_job_id":"f7c7e263-5bea-4885-a287-db8e79e94bd8","html_url":"https://github.com/MarcGiffing/wicket-spring-boot","commit_stats":{"total_commits":497,"total_committers":19,"mean_commits":"26.157894736842106","dds":0.08853118712273644,"last_synced_commit":"d5fbbda354f04113e2173c8e195a66b7080b45e9"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcGiffing%2Fwicket-spring-boot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcGiffing%2Fwicket-spring-boot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcGiffing%2Fwicket-spring-boot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcGiffing%2Fwicket-spring-boot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarcGiffing","download_url":"https://codeload.github.com/MarcGiffing/wicket-spring-boot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247569124,"owners_count":20959760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","spring","spring-boot","spring-boot-starter","wicket"],"created_at":"2024-10-12T02:18:48.025Z","updated_at":"2025-04-07T00:13:44.503Z","avatar_url":"https://github.com/MarcGiffing.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Wicket autoconfiguration with Spring Boot\n\nCurrent release version:\n\n* 4.1.x - http://wicket.apache.org/[Wicket 10.2] with Spring Boot 3.3.4 - Branch master\n* 4.0.x - http://wicket.apache.org/[Wicket 10.0] with Spring Boot 3.2.x - Branch master\n\nNOTE: http://search.maven.org/#search|ga|1|com.giffing.wicket.spring.boot\n\nNOTE: Example projects: https://github.com/MarcGiffing/wicket-spring-boot-examples\n\n* \u003c\u003cintroduction\u003e\u003e\n* \u003c\u003cgetting_started\u003e\u003e\n* \u003c\u003chow_does_it_work\u003e\u003e\n* \u003c\u003cspring_profile_dev_configuration\u003e\u003e\n* \u003c\u003ccustom-conditions\u003e\u003e\n* \u003c\u003cextension\u003e\u003e\n* \u003c\u003cwar_deployment\u003e\u003e\n\n[[introduction]]\n== Introduction\n\nhttps://dzone.com/articles/enhance-wicket-with-spring-boot *by Andrea Del Bene*\n\nThis project makes it easy to create a new Wicket projects with a minimum\nof configuration effort. It uses Spring Boot to autoconfigure Wickets core and\nits extension (related projects like wicketstuff, beanvalidation...) with an reasonable default value which can be overridden over property files.\n\n* Core Features\n\n** Configures an embedded Servlet Container by default (Spring Boot Feature).\n** Autoconfiguration of the needed link:wicket-spring-boot-starter/src/main/java/com/giffing/wicket/spring/boot/starter/web/WicketWebInitializer.java[Wicket Servlet filters].\n** Autoconfiguration for Spring/Spring-Security and dependency injection support with @SpringBean.\n** Autoconfiguration of Wicket \u003c\u003cextension\u003e\u003e.\n** Faster development support with \u003c\u003cextension-springboot-devtools\u003e\u003e\n\n[[getting_started]]\n== Getting started\n\nTo get started you have to create a new Maven Project (or another preferred dependency/build-management tool)\nand add the *wicket-spring-boot-starter* dependency to your configuration. \n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.giffing.wicket.spring.boot.starter\u003c/groupId\u003e\n  \u003cartifactId\u003ewicket-spring-boot-starter\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\nBeside the Maven dependency configuration we need the following steps to do\n\n. Create a class which is marked with @SpringBootApplication - see http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#using-boot-using-springbootapplication-annotation[Springs documentation]\n. Create your HomePage class (with HTML) which will me marked with @WicketHomePage\n\n\n[source,java]\n----\n@SpringBootApplication\npublic class WicketApplication {\n  public static void main(String[] args) throws Exception {\n    new SpringApplicationBuilder()\n      .sources(WicketApplication.class)\n      .run(args);\n  }\n\n}\n\n@WicketHomePage\npublic class HomePage extends WebPage {\n}\n\n\u003chtml xmlns:wicket=\"http://wicket.apache.org\"\u003e\n\t\u003chead\u003e\u003c/head\u003e\n\t\u003cbody\u003e\n\t\tYou content\n\t\t\u003cwicket:child/\u003e\n\t\u003c/body\u003e\n\u003c/html\u003e\n\n----\n\nThats all! When you execute the main method you will get a fully working and configured \nWicket application. An embedded Tomcat is automatically started.\n\nIn a usal Wicket application you would like to provide custom configuration in Wickets WebApplication init() method.\nYou could create your own 'extension' by creating a bean which implements WicketApplicationInitConfiguration\n\n[source,java]\n----\n@ApplicationInitExtension\npublic class YouExtensionConif implements WicketApplicationInitConfiguration {\n\n  @Override\n  public void init(WebApplication webApplication) {\n  \t// your custom configuration\n  }\n\n}\n----\n\nIf this configuration is not enough and you want to override special methods of Wickets WebApplication class you have\nto create a bean which extends one of the following two classes\n\n* WicketBootStandardWebApplication - Without Security\n* WicketBootSecuredWebApplication  - With Security - You'll need a security provider like \u003c\u003cextension-spring-security\u003e\u003e\n\n[source,java]\n----\n@Component\npublic class WicketWebApplication extends WicketBootSecuredWebApplication {\n  @Override\n  protected void init() {\n    super.init();\n  }\n}\n----\n\nThe custom WicketWebApplication is automatically picked up instead of the default provided one.\nYou can also override the getHomePage method() if you don't want to use the special @WicketHomePage annotations\nto mark the home page.\n\nTo package the application as an executable jar you have to add the spring-boot-maven-plugin.\n\n[source,xml]\n----\n \u003cplugin\u003e\n  \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n  \u003cartifactId\u003espring-boot-maven-plugin\u003c/artifactId\u003e\n\u003c/plugin\u003e\n----\n\nResource files (html, css, js, ...) are not copied to the target folder if placed in the *src/main/java*\nfolder. You have to tell Maven to copy these files:\n\n\n[source,xml]\n----\n\u003cresources\u003e\n  \u003cresource\u003e\n    \u003cdirectory\u003esrc/main/resources\u003c/directory\u003e\n  \u003c/resource\u003e\n  \u003cresource\u003e\n    \u003cdirectory\u003esrc/main/java\u003c/directory\u003e\n    \u003cincludes\u003e\n      \u003cinclude\u003e**\u003c/include\u003e\n    \u003c/includes\u003e\n    \u003cexcludes\u003e\n      \u003cexclude\u003e**/*.java\u003c/exclude\u003e\n    \u003c/excludes\u003e\n  \u003c/resource\u003e\n\u003c/resources\u003e\n----\n\n[[how_does_it_work]]\n== How does it work?\n\nTo fully understand how http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-developing-auto-configuration[Spring Boots autconfiguration] \nand in general Spring Boot works you should read the excellent \nhttp://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/[documentation] from this fantastic http://projects.spring.io/spring-boot/[project].\n\nAs an an example we will look to the AnnotatedMountScanner configuration. The https://github.com/wicketstuff/core/wiki/Annotation[annotated mount scanner] \nis an project which supports bookmarkable URLs configured by annotations on WebPage classes. If you have this '@MountPath(\"login\")' annotation on a \nWebPage then the Page is mounted to 'http://localhost/login'.\n\nIn this project each configuration is separated in two classes to configure this particular feature/extension. The extension\nconsists of a property and a configuration class.\n\nThe property class holds properties to configure the specific feature. In the AnnotatedMountScannerProperties class we\nfound two properties:\n\n[source,java]\n----\n@ConfigurationProperties(prefix = AnnotatedMountScannerProperties.PROPERTY_PREFIX)\npublic class AnnotatedMountScannerProperties {\n\tpublic static final String PROPERTY_PREFIX = \"wicket.stuff.annotationscan\";\n\t/**\n\t * @see AnnotatedMountScannerConfig\n\t */\n\tprivate boolean enabled = true;\n\n\t/**\n\t * An alternative package name for scanning for mount path if the\n\t * WicketApplication should not used as the root scan package\n\t */\n\tprivate String packagename;\n----\n\nThis property file can be imported in the configuration class AnnotatedMountScannerConfig.\n\n[source,java]\n----\n/**\n * Auto configuration for the {@link AnnotatedMountScanner}.\n * \n * It uses the user defined {@link WebApplication} as the default package scan\n * root directory.\n * \n * Enables annotate mount scanner if the following two condition matches:\n * \n * 1. The {@link AnnotatedMountScanner} is in the classpath.\n * \n * 2. The property {@link AnnotatedMountScannerProperties#PROPERTY_PREFIX}\n * .enabled is true (default = true)\n * \n * \n * @author Marc Giffing\n *\n */\n@ApplicationInitExtension\n@ConditionalOnProperty(prefix = AnnotatedMountScannerProperties.PROPERTY_PREFIX, value = \"enabled\", matchIfMissing = true)\n@ConditionalOnClass(value = org.wicketstuff.annotation.scan.AnnotatedMountScanner.class)\n@EnableConfigurationProperties({ AnnotatedMountScannerProperties.class })\npublic class AnnotatedMountScannerConfig implements WicketApplicationInitConfiguration {\n\n\t@Autowired\n\tprivate AnnotatedMountScannerProperties prop;\n\n\t@Override\n\tpublic void init(WebApplication webApplication) {\n\t\tString packagename = webApplication.getClass().getPackage().getName();\n\t\tif (prop.getPackagename() != null) {\n\t\t\tpackagename = prop.getPackagename();\n\t\t}\n\t\tnew AnnotatedMountScanner().scanPackage(packagename).mount(webApplication);\n\t}\n}\n----\n\nIf all conditions on the AnnotatedMountScannerConfig matches the configuration class is configured as\na spring bean. All Spring beans which implements the interface WicketApplicationInitConfiguration will\nbe injected as a list in the default WicketBootWebApplication class.  \n\nIn the WicketBootWebApplication class we iterate in Wickets init method over the list and call on each the\ninit method to configure the application.\n\n[source,java]\n----\npublic class WicketBootWebApplication extends AuthenticatedWebApplication {\n  @Autowired(required = false)\n  private List\u003cWicketApplicationInitConfiguration\u003e configurations = new ArrayList\u003c\u003e();\n  @Override\n  protected void init() {\n    super.init();\n    for (WicketApplicationInitConfiguration configuration : configurations) {\n      configuration.init(this);\n    }\n  }\n}\n----\n\n[[spring_profile_dev_configuration]]\n=== Spring profile configuration\n\nThe Wicket Spring Boot Starter project ships with a default development configuration.\nIt can be activated by activating the 'development' Spring profile in the main class or over\nexternal JVM/Maven arguments.\n\nThe default configuration can be overridden with a custom property file. See Spring Boots reference documentation http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config[here].\n\ninclude::wicket-spring-boot-starter/src/main/resources/application-development.yml[]\n[source,yml]\n----\nwicket:\n  core:\n    settings:\n      general:\n        configuration-type: development\n      debug:\n        enabled: true\n        component-use-check: true\n        development-utilities-enabled: true\n  stuff:\n    htmlcompressor:\n      enabled: false\n      features:\n        removeComments: false\n        removeMultiSpaces: false\n        removeIntertagSpaces: false\n        removeQuotes: false\n        compressJavaScript: false\n        compressCss: false\n        simpleDoctype: false\n        removeScriptAttributes: false\n        removeStyleAttributes: false\n        removeLinkAttributes: false\n        removeFormAttributes: false\n        removeInputAttributes: false\n        simpleBooleanAttributes: false\n        removeJavaScriptProtocol: false\n        removeHttpProtocol: false\n        removeHttpsProtocol: false\n        preserveLineBreaks: false\n  external:\n    development:\n      devutils:\n        statelesschecker:\n          enabled: true\n        interceptor:\n          enable-live-sessions-page: true\n        diskstorebrowser:\n          enabled: true\n      wicketsource:\n        enabled: true\n----\n\n[[custom-conditions]]\n== Custom conditions\n\nThis section lists custom conditional configuration like Spring Boot ones. \n\n=== @ConditionalOnWicket\n\nWith the ConditionOnWicket annotation you can check that configuration classes only apply\non a specific Wicket major version. If some functionality is only available on Wicket 7 \nyou can use this annotation.\n\n[source,java]\n----\n@ApplicationInitExtension\n@ConditionalOnWicket(value=7, range=Range.EQUALS_OR_HIGHER)\npublic ConditionalConfig implements WicketApplicationInitConfiguration{\n\t@Override\n\tpublic void init(WebApplication webApplication) {\n\t\t// configuration option which only apply to Wickets major version 7 or higher\n\t}\n}\n----\n\n[[extension]]\n== Extensions\n\nThe following section describes the current extensions and the\nrequired dependencies. An extension is a custom labeling in this project\nwhich is used to auto-configure a specific part of an Wicket application. An extension\nmay require an external dependency or is using Wickets core features. See section\n\u003c\u003chow_does_it_work\u003e\u003e to get a deeper knowledge.\n\n* \u003c\u003cextension-general\u003e\u003e\n** DEPLOYMENT-CONFIGURATIONS\n*** \u003c\u003cextension-spring-security\u003e\u003e\n*** \u003c\u003cextension-wicket-websocket\u003e\u003e\n*** \u003c\u003cextension-beanvalidation\u003e\u003e\n*** \u003c\u003cextension-core-csrf-prevention\u003e\u003e\n*** \u003c\u003cextension-webjars\u003e\u003e\n*** \u003c\u003cextension-wicketstuff-htmlcompressor\u003e\u003e\n*** \u003c\u003cextension-wicketstuff-annotationscan\u003e\u003e\n*** \u003c\u003cextension-core-serializer-deflated\u003e\u003e\n*** \u003c\u003cextension-wicketstuff-serializer-fast2\u003e\u003e\n*** \u003c\u003cextension-wicketstuff-serializer-kryo2\u003e\u003e\n*** \u003c\u003cextension-wicketstuff-restannotations\u003e\u003e\n*** \u003c\u003cextension-datastore-httpsession\u003e\u003e\n*** \u003c\u003cextension-datastore-cassandra\u003e\u003e\n*** \u003c\u003cextension-datastore-hazelcast\u003e\u003e\n*** \u003c\u003cextension-datastore-memcached\u003e\u003e\n*** \u003c\u003cextension-datastore-redis\u003e\u003e\n*** \u003c\u003cextension-wicketstuff-jamon\u003e\u003e\n\n** DEVELOPMENT-CONFIGURATIONS\n*** \u003c\u003cextension-general-debugsettings\u003e\u003e\n*** \u003c\u003cextension-devutils-diskstorebrowser\u003e\u003e\n*** \u003c\u003cextension-devutils-inspector\u003e\u003e\n*** \u003c\u003cextension-devutils-statelesschecker\u003e\u003e\n*** \u003c\u003cextension-wicketsource\u003e\u003e\n*** \u003c\u003cextension-springboot-devtools\u003e\u003e\n\n[[extension-general]]\n=== General\n\nWicket can be started in DEVELOPMENT and DEPLOYMENT mode. You can change the\nconfiguration type over the following property configuration. The given property\nis automatically mapped to Wickets ConfigurationType enumeration. \n \n\n[source,properties]\n----\nwicket.core.settings.general.configuration-type=development # development/deployment(default)\n\nwicket.web.servlet.filter-mapping-param=/*\nwicket.web.servlet.dispatcher-types=request, error, async # request, error, async, include, forward\nwicket.web.servlet.init-parameters.*= # map\u003cstring,string\u003e - configuration support for additional servlet init parameters\n\n#exception settings\nwicket.core.settings.exceptions.thread-dump-strategy=thread_holding_lock\nwicket.core.settings.exceptions.error-handling-strategy-during-ajax-requests=redirect_to_error_page\n\nwicket.core.settings.requestcycle.render-strategy=redirect-to-buffer # redirect-to-buffer / one-pass-render / redirect-to-render\nwicket.core.settings.requestcycle.buffer-response=true\nwicket.core.settings.requestcycle.gather-extended-browser-info=false\nwicket.core.settings.requestcycle.response-request-encoding=UTF-8\nwicket.core.settings.requestcycle.timeout-size=1\nwicket.core.settings.requestcycle.timeout-unit=minutes\nwicket.core.settings.requestcycle.exception-retry-count=10\n\n#Markup - Settings\nwicket.core.settings.markup.default-markup-encoding=UTF-8 # if null it uses the system default \nwicket.core.settings.markup.automatic-linking=false\nwicket.core.settings.markup.compress-whitespace=false\nwicket.core.settings.markup.strip-comments=false\nwicket.core.settings.markup.strip-wicket-tags=true\nwicket.core.settings.markup.throw-exception-on-missing-xml-declaration=false\n\n#RequestLogger - Settings\nwicket.core.settings.requestlogger.enabled=false\nwicket.core.settings.requestlogger.record-session-size\nwicket.core.settings.requestlogger.requests-window-size\n\n\nwicket.core.requestmapper.cryptmapper.enabled=false # URL encryption support\n\n\nwicket.core.settings.pagestore.enabled=false # enables custom store settings\nwicket.core.settings.pagestore.session-size=2\nwicket.core.settings.pagestore.session-unit=megabytes\nwicket.core.settings.pagestore.asynchronous= # overrides wickets default value only when set\nwicket.core.settings.pagestore.asynchronous-queue-capacity= # overrides wickets default value only when set\nwicket.core.settings.pagestore.file-store-folder= # overrides wickets default value only when set\nwicket.core.settings.pagestore.inmemory-cache-size= # overrides wickets default value only when set\n\t\n----\nIf you insert e.g. developmentx you will get a startup error:\n[listing]\nField error in object 'wicket' on field 'configurationType': rejected value [developmentx]; codes [typeMismatch.wicket.configurationType\n\n==== Special Annotations\n\n* @WicketHomePage\n** A Page marked with this annotation will be configured as the default home page. If multiple WicketHomePage annotation found an exception is thrown.\n* @WicketSignInPage\n** A Page marked with this annotation will be configured as the default login page. A security provider like Spring Security is needed. If multiple annotations found an exception is thrown. \n* @WicketAccessDeniedPage\n** A Page marked with this annotation will be configured as the default access denied page.  \n* @WicketInternalErrorPage\n** A Page marked with this annotation will be configured as the default internal error page.\n* @WicketExpiredPage  \n** A Page marked with this annotation will be configured as the default expired page.\n\n[[extension-spring-security]]\n=== Spring Security\n\nThis starter detects automatically Spring Security if the Spring Boot Starter Security dependency is added. \nInternally the WicketBootSecuredWebApplication is used instead of the WicketBootStandardWebApplication class.\n\n[source,xml]\n----\n\u003cdependency\u003e\n \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n \u003cartifactId\u003espring-boot-starter-security\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\nIf you wan't to disable the Spring Security configuration for Wicket use the following property.\n\n[source,properties]\n----\nwicket.external.spring.security=false\n----\n\n\n[[extension-wicket-websocket]]\n=== Wicket Native WebSockets\n\nhttps://ci.apache.org/projects/wicket/guide/7.x/guide/single.html#nativewebsockets[Documentation]\n\nThis project provides an auto configuration support for native WebSockets. If the required dependencies\nare in the classpath a JavaxWebSocketFilter servlet filter is configured instead of the default WicketFilter. \n\nTo simplify the usage of sending WebSocket messages a class named WebSocketMessageBroadcaster is automatically registered as a \nspring bean. You can inject the class anywhere with @SpringBean and use the 'send' method to send WebSocket messages.\n\n\n[source,properties]\n----\nwicket.external.websocket=true # enables WebSocket support - dependency required (move documentation to seperated section)\n----\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.apache.wicket\u003c/groupId\u003e\n  \u003cartifactId\u003ewicket-native-websocket-javax\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n\n[[extension-beanvalidation]]\n=== Bean validation\n\nWicket support for JSR 303 Bean validation.\nSee Wickets user guide \nhttps://ci.apache.org/projects/wicket/guide/7.x/guide/single.html[Validation with JSR 303]\n\nTo enable Wickets bean validation you have to add the *wicket-bean-validation* dependency to your\nproject. It will automatically configured and can be used in the project.\n\n[source,properties]\n----\nwicket.external.beanvalidation.enabled=true # enabled by default if bean validation project is present\n----\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.apache.wicket\u003c/groupId\u003e\n  \u003cartifactId\u003ewicket-bean-validation\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n[[extension-core-csrf-prevention]]\n=== Core - Prevention of CSRF Attacks\n\n\n\n[source,properties]\n----\nwicket.core.csrf.enabled=true\nwicket.core.csrf.no-origin-action=allow\nwicket.core.csrf.conflicting-origin-action=abort\nwicket.core.csrf.error-code=400\nwicket.core.csrf.error-message=Origin does not correspond to request\nwicket.core.csrf.accepted-origins[0]=domain.name.tld        # Just the domain name, no protocol\nwicket.core.csrf.accepted-origins[1]=other-domain.name.tld  # Add more origins by increasing the index\n\n#TODO: There are some configuration options which should be added\n----\n\n[[extension-webjars]]\n=== Webjars\n\nhttps://github.com/l0rdn1kk0n/wicket-webjars\n\n[source,properties]\n----\nwicket.external.webjars.enabled=true\n----\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003ede.agilecoders.wicket.webjars\u003c/groupId\u003e\n  \u003cartifactId\u003ewicket-webjars\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n[[extension-wicketstuff-annotationscan]]\n=== Wicketstuff - annotationscan\n\nUse wicketstuff-annotation to use Java Annotations and class path searching to mount your Wicket pages.\n\nSee https://github.com/wicketstuff/core/wiki/Annotation[documentation]\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.wicketstuff\u003c/groupId\u003e\n  \u003cartifactId\u003ewicketstuff-annotation\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n[source,properties]\n----\nwicket.stuff.annotationscan.enabled=true\nwicket.stuff.annotationscan.packagename=\n----\n\n[[extension-wicketstuff-htmlcompressor]]\n=== Wicketstuff - htmlcompressor\n\nSee https://github.com/wicketstuff/core/wiki/Htmlcompressor[documentation]\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.wicketstuff\u003c/groupId\u003e\n  \u003cartifactId\u003ewicketstuff-htmlcompressor\u003c/artifactId\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.yahoo.platform.yui\u003c/groupId\u003e\n  \u003cartifactId\u003eyuicompressor\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n[source,properties]\n----\nwicket.stuff.htmlcompressor.enabled=true\nwicket.stuff.htmlcompressor.features.*=\n----\n\n[[extension-core-serializer-deflated]]\n=== Core - serializer-deflated\n\n[source,properties]\n----\nwicket.core.serializer.deflated.enabled=false # has to be explicit enabled. deflates the outputstream, reducing page store size by up to a factor 8 at a price of about 2-20ms\n----\n\n[[extension-wicketstuff-serializer-fast2]]\n=== Wicketstuff - serializer-fast2\n\nSee https://github.com/wicketstuff/core/wiki/FastSerializer2[documentation]\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.wicketstuff\u003c/groupId\u003e\n  \u003cartifactId\u003ewicketstuff-serializer-fast2\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n\n[source,properties]\n----\nwicket.stuff.serializer.fast2.enabled=true\n----\n\n[[extension-wicketstuff-serializer-kryo2]]\n=== Wicketstuff - serializer-kryo2\n\nSee https://github.com/wicketstuff/core/wiki/Kryo-Serializer[documentation]\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.wicketstuff\u003c/groupId\u003e\n  \u003cartifactId\u003ewicketstuff-serializer-kryo2\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n[source,properties]\n----\nwicket.stuff.serializer.fast2.enabled=true\n----\n\n\n[[extension-wicketstuff-restannotations]]\n=== Wicketstuff - restannotations\n\nSee https://github.com/wicketstuff/core/tree/master/wicketstuff-restannotations-parent[documentation]\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.wicketstuff\u003c/groupId\u003e\n  \u003cartifactId\u003ewicketstuff-restannotations\u003c/artifactId\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.wicketstuff\u003c/groupId\u003e\n  \u003cartifactId\u003ewicketstuff-restannotations-json\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n[source,properties]\n----\nwicket.stuff.restannotations.enabled=true\nwicket.stuff.restannotations.packagename= # the package name to scan for project specific annotations\n----\n\n\n[[extension-general-debugsettings]]\n=== General - debugsettings\n\nWicket provides some debug settings which could be \n\n[source,properties]\n----\nwicket.core.settings.debug.enabled=false\nwicket.core.settings.debug.developmentUtilitiesEnabled=true # Enables all of the panels and pages, etc, from wicket-devutils package.\nwicket.core.settings.debug.ajaxDebugModeEnabled=true # if true: wicket-ajax-debug.js is added to header\nwicket.core.settings.debug.componentUseCheck=true\nwicket.core.settings.debug.outputMarkupContainerClassName=false\nwicket.core.settings.debug.componentPathAttributeName=\n----\n\n\n\n[[extension-datastore]]\n== Datastore\n\n[[extension-datastore-httpsession]]\n=== Datastore HttpSession\n\n[source,properties]\n----\nwicket.core.datastore.httpsession.enabled=false\nwicket.core.datastore.httpsession.pagesNumber=20 # the maximum number of pages the data store can hold\n----\n\n\n[[extension-datastore-cassandra]]\n=== Datastore cassandra\n\nSee https://github.com/wicketstuff/core/wiki/DataStores[Documentation]\n\n[source,properties]\n----\nwicket.stuff.datastore.cassandra.enabled=true\nwicket.stuff.datastore.cassandra.contact-points= #comma-separated list \nwicket.stuff.datastore.cassandra.table-name=pagestore\nwicket.stuff.datastore.cassandra.keyspace-name=wicket\nwicket.stuff.datastore.cassandra.record-ttl=30\nwicket.stuff.datastore.cassandra.record-ttl-unit=minutes\nwicket.stuff.datastore.cassandra.session-size=2\nwicket.stuff.datastore.cassandra.session-unit=megabytes\n----\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.wicketstuff\u003c/groupId\u003e\n  \u003cartifactId\u003ewicketstuff-datastore-cassandra\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n[[extension-datastore-hazelcast]]\n=== Datastore hazelcast\n\nSee https://github.com/wicketstuff/core/wiki/DataStores[Documentation]\n\n[source,properties]\n----\nwicket.stuff.datastore.hazelcast.enabled=true\nwicket.stuff.datastore.hazelcast.session-size=2L \nwicket.stuff.datastore.hazelcast.session-unit=megabytes\n----\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.wicketstuff\u003c/groupId\u003e\n  \u003cartifactId\u003ewicketstuff-datastore-hazelcast\u003c/artifactId\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.hazelcast\u003c/groupId\u003e\n  \u003cartifactId\u003ehazelcast\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n[[extension-datastore-memcached]]\n=== Datastore memcached\n\nSee https://github.com/wicketstuff/core/wiki/DataStores[Documentation]\n\n[source,properties]\n----\nwicket.stuff.datastore.memcached.enabled=true\nwicket.stuff.datastore.memcached.session-size=2L \nwicket.stuff.datastore.memcached.session-unit=megabytes\nwicket.stuff.datastore.memcached.expiration-time=30\nwicket.stuff.datastore.memcached.port=11211\nwicket.stuff.datastore.memcached.server-names=\nwicket.stuff.datastore.memcached.shutdown-timeout=30\nwicket.stuff.datastore.memcached.shutdown-timeout-unit=minutes\n----\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.wicketstuff\u003c/groupId\u003e\n  \u003cartifactId\u003ewicketstuff-datastore-memcached\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n[[extension-datastore-redis]]\n=== Datastore redis\n\nSee https://github.com/wicketstuff/core/wiki/DataStores[Documentation]\n\n[source,properties]\n----\nwicket.stuff.datastore.redis.enabled=true\nwicket.stuff.datastore.redis.session-size=2L \nwicket.stuff.datastore.redis.session-unit=megabytes\nwicket.stuff.datastore.redis.expiration-time=30\nwicket.stuff.datastore.redis.port=11211\nwicket.stuff.datastore.redis.server-names=\nwicket.stuff.datastore.redis.shutdown-timeout=30\nwicket.stuff.datastore.redis.shutdown-timeout-unit=minutes\n----\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.wicketstuff\u003c/groupId\u003e\n  \u003cartifactId\u003ewicketstuff-datastore-redis\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n\n[[extension-wicketstuff-jamon]]\n=== Wicketstuff - JAMon\n\nUsed to monitor page requests. Provides a statistic page.\n\nSee https://github.com/wicketstuff/core/blob/master/jamon-parent/[Github]\n\n[source,properties]\n----\nwicket.stuff.monitoring.jamon.enabled=true\nwicket.stuff.monitoring.jamon.include-source-name-in-monitor-label=true\nwicket.stuff.monitoring.jamon.mountPage=/monitoring/jamon # the url to which the statistic page is mounted\n----\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.wicketstuff\u003c/groupId\u003e\n  \u003cartifactId\u003ewicketstuff-jamon\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\nNOTE: JAMon includes hazelcast to gather statistics. You may need to disable the datastore hazelcast support: \u003c\u003cextension-datastore-hazelcast\u003e\u003e\n\n[[extension-devutils]]\n=== Devutils\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.apache.wicket\u003c/groupId\u003e\n  \u003cartifactId\u003ewicket-devutils\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n[[extension-devutils-diskstorebrowser]]\n==== Devutils - diskstorebrowser\n\n[source,properties]\n----\nwicket.external.development.devutils.diskstorebrowser.enabled=false\nwicket.external.development.devutils.diskstorebrowser.mountPage=devutils/diskstore/browser\n----\n\n[[extension-devutils-inspector]]\n==== Devutils - inspector\n\n[source,properties]\n----\nwicket.external.development.devutils.diskstorebrowser.enabled=false\nwicket.external.development.devutils.diskstorebrowser.mountPage=devutils/diskstore/browser\n----\n\n[[extension-devutils-statelesschecker]]\n==== Devutils - statelesschecker\n\n[source,properties]\n----\nwicket.external.development.devutils.interceptor.enableLiveSessionsPage=false\nwicket.external.development.devutils.interceptor.liveSessionPageMount=devutils/inspector/live-session-page\n----\n\n[[extension-wicketsource]]\n=== Wicket-Source\n\nSee https://github.com/jennybrown8/wicket-source/wiki[documentation]\n\n[source,xml]\n----\n\u003cdependency\u003e\n\t\u003cgroupId\u003ecom.github.jennybrown8.wicket-source\u003c/groupId\u003e\n\t\u003cartifactId\u003ewicket-source\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n[source,properties]\n----\nwicket.external.development.wicketsource.enabled=false\n----\n\n[[extension-springboot-devtools]]\n==== Spring Boot - DevTools\n\nSee https://spring.io/blog/2015/06/17/devtools-in-spring-boot-1-3[Spring Boot DevTools]\n\nThe project tries to improve the development-time experience when working with Spring Boot. \nThere is a problem with Wickets default and other serializer (fast2, kryo2...). See https://github.com/MarcGiffing/wicket-spring-boot/issues/29[Issue 29]\nIf the spring-boot-devtools dependency is in the classpath a \nlink:/wicket-spring-boot-starter/src/main/java/com/giffing/wicket/spring/boot/starter/configuration/extensions/external/development/springboot/devtools/SpringDevToolsSerializer.java[special Spring serializer]\nwill be activated. \n\nAll other serializer will only be activated if the Spring Boot DevTools dependency is not in the classpath.\n\n[source,xml]\n----\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n        \u003cartifactId\u003espring-boot-devtools\u003c/artifactId\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n----\n\n[[war_deployment]]\n== Configure as WAR for deploy on Servlet Container\n\n#115\n\nTo run the application as a *war* file in the Servlet Container like Tomcat you have to do the following steps.\n\n* Set the packaging to war in your build system (maven, gradle)\n* Mark the *spring-boot-starter-tomcat* dependency as provided\n* Use the Spring provided plugins to repackage the project\n* Extend from SpringBootServletInitializer\n** Here you can optionally set configurations which only apply when deployed as a war in a Servlet Container  \n** http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#build-tool-plugins-maven-packaging[maven]\n** http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#build-tool-plugins-gradle-repackage-configuration[gradle] \n\n\n[source,java]\n----\n@SpringBootApplication\npublic class WicketApplication extends SpringBootServletInitializer  {\n\n//Can be used while developing\npublic static void main(String[] args) throws Exception {\n\tnew SpringApplicationBuilder()\n\t\t.sources(WicketApplication.class)\n\t\t.run(args);\n}\n\n//Executed when deployed as a WAR in a Servlet container.\n@Override\nprotected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {\n\tbuilder.properties( WebSocketWicketWebInitializerAutoConfiguration.REGISTER_SERVER_ENDPOINT_ENABLED + \"=false\" );\n\treturn super.configure( builder );\n}\n\n}\n----\n\nIf you already extend from a Wicket specific class you can create a separated class which extends from SpringBootServletInitializer (https://github.com/MarcGiffing/wicket-spring-boot/issues/115#issuecomment-311712298).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcgiffing%2Fwicket-spring-boot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcgiffing%2Fwicket-spring-boot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcgiffing%2Fwicket-spring-boot/lists"}