357.cd5ce764.js 20.0 KB
Newer Older
茶陵後's avatar
茶陵後 已提交
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[357],{782:function(e,t,r){"use strict";r.r(t);var a=r(56),s=Object(a.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"_2-what-s-new"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-what-s-new"}},[e._v("#")]),e._v(" 2. What's New")]),e._v(" "),r("h2",{attrs:{id:"_2-1-spring-web-flow-2-5"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-spring-web-flow-2-5"}},[e._v("#")]),e._v(" 2.1. Spring Web Flow 2.5")]),e._v(" "),r("p",[e._v("This release provides an upgrade path to Spring Framework 5 that in turn requires\nJava 8+, Servlet 3.1, Hibernate 5, Tiles 3. See the"),r("a",{attrs:{href:"https://github.com/spring-projects/spring-framework/wiki/What%27s-New-in-Spring-Framework-5.x",target:"_blank",rel:"noopener noreferrer"}},[e._v("Spring Framework wiki"),r("OutboundLink")],1),e._v("for more details. The "),r("a",{attrs:{href:"https://github.com/spring-projects/spring-webflow-samples",target:"_blank",rel:"noopener noreferrer"}},[e._v("samples repository"),r("OutboundLink")],1),e._v("has been upgraded to Spring Web Flow 2.5.")]),e._v(" "),r("p",[e._v("As of 2.5 there is no longer a "),r("em",[e._v("spring-js")]),e._v(" module. The classes from that module\nhave been kept but moved to new packages in the "),r("em",[e._v("spring-webflow")]),e._v(" module.\nThe "),r("em",[e._v("spring-js-resources")]),e._v(" module is available as an optional module that\nmust be included explicitly.")]),e._v(" "),r("p",[e._v("This release requires JSF 2.2 or higher.")]),e._v(" "),r("h2",{attrs:{id:"_2-2-spring-web-flow-2-4"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-2-spring-web-flow-2-4"}},[e._v("#")]),e._v(" 2.2. Spring Web Flow 2.4")]),e._v(" "),r("p",[e._v("This release requires JDK 1.6.")]),e._v(" "),r("h3",{attrs:{id:"_2-2-1-java-based-configuration"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-2-1-java-based-configuration"}},[e._v("#")]),e._v(" 2.2.1. Java-based Configuration")]),e._v(" "),r("p",[e._v("Web Flow now supports a Java-based alternative for its system configuration.\nSee the updated "),r("RouterLink",{attrs:{to:"/en/spring-web-flow/system-setup.html"}},[e._v("Chapter 10, "),r("em",[e._v("System Setup")])]),e._v(".")],1),e._v(" "),r("p",[e._v("Also see the"),r("a",{attrs:{href:"https://github.com/spring-projects/spring-webflow-samples/tree/master/booking-mvc",target:"_blank",rel:"noopener noreferrer"}},[e._v("booking-mvc"),r("OutboundLink")],1),e._v(" and"),r("a",{attrs:{href:"https://github.com/spring-projects/spring-webflow-samples/tree/master/booking-faces",target:"_blank",rel:"noopener noreferrer"}},[e._v("booking-faces"),r("OutboundLink")],1),e._v("samples that have been updated to use all Java config.")]),e._v(" "),r("h3",{attrs:{id:"_2-2-2-spring-mvc-flash-scope-integration"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-2-2-spring-mvc-flash-scope-integration"}},[e._v("#")]),e._v(" 2.2.2. Spring MVC Flash Scope Integration")]),e._v(" "),r("p",[e._v("When a flow ends it can now redirect to a Spring MVC controller after saving\nattributes in Spring MVC's flash scope for the controller to access.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/en/spring-web-flow/spring-mvc.html#spring-mvc-flash-output"}},[e._v("Section 11.8, “Saving Flow Output to MVC Flash Scope”")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"_2-2-3-partial-jsr-303-bean-validation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-2-3-partial-jsr-303-bean-validation"}},[e._v("#")]),e._v(" 2.2.3. Partial JSR-303 Bean Validation")]),e._v(" "),r("p",[e._v("A flow definition can apply partial validation on the model through the validation-hints\nattribute supported on view state and transition elements.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/en/spring-web-flow/views.html#view-validation-jsr303-partial"}},[e._v("the section called “Partial Validation”")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"_2-2-4-hibernate-support"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-2-4-hibernate-support"}},[e._v("#")]),e._v(" 2.2.4. Hibernate Support")]),e._v(" "),r("p",[e._v("The "),r("code",[e._v("HibernateFlowExecutionListener")]),e._v(" now supports Hibernate 4 in addition to Hibernate 3.")]),e._v(" "),r("p",[e._v("As of 2.4.4 the "),r("code",[e._v("HibernateFlowExecutionListener")]),e._v(" also works with Hibernate 5.")]),e._v(" "),r("h3",{attrs:{id:"_2-2-5-tiles-3-support"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-2-5-tiles-3-support"}},[e._v("#")]),e._v(" 2.2.5. Tiles 3 Support")]),e._v(" "),r("p",[e._v("The "),r("code",[e._v("AjaxTilesView")]),e._v(" now supports Tiles 3 in addition to Tiles 2.2.")]),e._v(" "),r("h3",{attrs:{id:"_2-2-6-minimum-jsf-2-0-requirement"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-2-6-minimum-jsf-2-0-requirement"}},[e._v("#")]),e._v(" 2.2.6. Minimum JSF 2.0 Requirement")]),e._v(" "),r("p",[e._v("Java ServerFaces version 1.2 and earlier are no longer supported by Spring Web Flow, if you have not done so already you will need to upgrade to JSF 2.0 or above.\nIn addition the Spring Faces components that were previously provided with JSF 1.2 for progressive AJAX enhancements have been removed in this release.")]),e._v(" "),r("p",[e._v("See "),r("a",{attrs:{href:""}},[e._v("???")]),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"_2-2-7-portlet-api-2-0-and-jsf-2-0-support"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-2-7-portlet-api-2-0-and-jsf-2-0-support"}},[e._v("#")]),e._v(" 2.2.7. Portlet API 2.0 and JSF 2.0 support")]),e._v(" "),r("p",[e._v("The internal Portlet integration introduced in Spring Web Flow 2.2 has been upgraded for JSF 2.0 compatibility.\nSome of the more advanced JSF 2.0 features, such as partial state saving, are not supported in a Portlet environment, however, existing application can now upgrade to the minimum required JSF version.\nUpgraded projects will need to ensure that the "),r("code",[e._v("<faces:resources>")]),e._v(" elements is\nincluded as part of their Spring configuration.")]),e._v(" "),r("h3",{attrs:{id:"_2-2-8-deprecations"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-2-8-deprecations"}},[e._v("#")]),e._v(" 2.2.8. Deprecations")]),e._v(" "),r("p",[e._v("This release deprecates "),r("em",[e._v("Spring.js")]),e._v(". The deprecation includes the entire"),r("em",[e._v("spring-js-resources")]),e._v(" module including "),r("em",[e._v("Spring.js")]),e._v(" and"),r("em",[e._v("Spring-Dojo.js")]),e._v(" and the bundled Dojo and CSS Framework.\nAlso deprecated is the "),r("code",[e._v("SpringJavascriptAjaxHandler")]),e._v("from the "),r("em",[e._v("spring-js")]),e._v(" module. The rest of "),r("em",[e._v("spring-js")]),e._v(",\ne.g. "),r("code",[e._v("AjaxHandler")]),e._v(", "),r("code",[e._v("AjaxTilesView")]),e._v(", will be\nfolded into "),r("em",[e._v("spring-webflow")]),e._v(" in a future release.")]),e._v(" "),r("p",[e._v("OGNL support is now deprecated.")]),e._v(" "),r("h2",{attrs:{id:"_2-3-spring-web-flow-2-3"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-3-spring-web-flow-2-3"}},[e._v("#")]),e._v(" 2.3. Spring Web Flow 2.3")]),e._v(" "),r("h3",{attrs:{id:"_2-3-1-embedding-a-flow-on-a-page"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-3-1-embedding-a-flow-on-a-page"}},[e._v("#")]),e._v(" 2.3.1. Embedding A Flow On A Page")]),e._v(" "),r("p",[e._v('By default Web Flow does a client-side redirect upon entering every view state.\nThat makes it impossible to embed a flow on a page or within a modal dialog and execute more than one view state without causing a full-page refresh.\nWeb Flow now supports launching a flow in "embedded" mode.\nIn this mode a flow can transition to other view states without a client-side redirect during Ajax requests.\nSee '),r("RouterLink",{attrs:{to:"/en/spring-web-flow/spring-mvc.html#spring-mvc-embedded-flow"}},[e._v("Section 11.7, “Embedding A Flow On A Page”")]),e._v(" and "),r("RouterLink",{attrs:{to:"/en/spring-web-flow/spring-faces.html#spring-faces-embedded-mode"}},[e._v("Section 13.6, “Embedding a Flow On a Page”")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"_2-3-2-support-for-jsr-303-bean-validation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-3-2-support-for-jsr-303-bean-validation"}},[e._v("#")]),e._v(" 2.3.2. Support For JSR-303 Bean Validation")]),e._v(" "),r("p",[e._v("Support for the JSR-303 Bean Validation API is now available building on equivalent support available in Spring MVC.\nSee "),r("RouterLink",{attrs:{to:"/en/spring-web-flow/views.html#view-validate"}},[e._v("Section 5.10, “Validating a model”")]),e._v(" for more details.")],1),e._v(" "),r("h3",{attrs:{id:"_2-3-3-flow-managed-persistence-context-propagation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-3-3-flow-managed-persistence-context-propagation"}},[e._v("#")]),e._v(" 2.3.3. Flow-Managed Persistence Context Propagation")]),e._v(" "),r("p",[e._v("Starting with Web Flow 2.3 a flow managed "),r("code",[e._v("PersistenceContext")]),e._v(" is automatically extended (propagated) to sub-flows assuming the subflow also has the feature enabled as well.\nSee "),r("RouterLink",{attrs:{to:"/en/spring-web-flow/flow-managed-persistence.html#flow-managed-persistence-propagation"}},[e._v("Section 7.3, “Flow Managed Persistence And Sub-Flows”")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"_2-3-4-portlet-2-0-resource-requests"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-3-4-portlet-2-0-resource-requests"}},[e._v("#")]),e._v(" 2.3.4. Portlet 2.0 Resource Requests")]),e._v(" "),r("p",[e._v("Support for Portlet 2.0 resource requests has now been added enabling Ajax requests with partial rendering.\nURLs for such requests can be prepared with the "),r("code",[e._v("<portlet:resourceURL>")]),e._v(" tag in JSP pages.\nServer-side processing is similar to a combined an action and a render requests but combined in a single request.\nUnlike a render request, the response from a resource request includes content from the target portlet only.")]),e._v(" "),r("h3",{attrs:{id:"_2-3-5-custom-conversationmanager"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-3-5-custom-conversationmanager"}},[e._v("#")]),e._v(" 2.3.5. Custom ConversationManager")]),e._v(" "),r("p",[e._v("The "),r("code",[e._v("<flow-execution-repository>")]),e._v(" element now provides a conversation-manager attribute accepting a reference to a ConversationManager instance.")]),e._v(" "),r("h3",{attrs:{id:"_2-3-6-redirect-in-same-state"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-3-6-redirect-in-same-state"}},[e._v("#")]),e._v(" 2.3.6. Redirect In Same State")]),e._v(" "),r("p",[e._v("By default Web Flow does a client-side redirect when remaining in the same view state as long as the current request is not an Ajax request.\nThis is useful after form validation failure.\nHitting Refresh or Back won't result in browser warnings. Hence this behavior is usually desirable.\nHowever a new flow execution attribute makes it possible to disable it and that may also be necessary in some cases specific to JSF applications.\nSee "),r("RouterLink",{attrs:{to:"/en/spring-web-flow/spring-faces.html#spring-faces-redirect-in-same-state"}},[e._v("Section 13.7, “Redirect In Same State”")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"_2-3-7-samples"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-3-7-samples"}},[e._v("#")]),e._v(" 2.3.7. Samples")]),e._v(" "),r("p",[e._v("The process for building the samples included with the distribution has been simplified.\nMaven can be used to build all samples in one step.\nEclipse settings include source code references to simplify debugging.")]),e._v(" "),r("p",[e._v("Additional samples can be accessed as follows:")]),e._v(" "),r("div",{staticClass:"language- extra-class"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[e._v("mkdir spring-samples\ncd spring-samples\nsvn co https://src.springframework.org/svn/spring-samples/webflow-primefaces-showcase\ncd webflow-primefaces-showcase\nmvn package\n# import into Eclipse\n\n")])])]),r("div",{staticClass:"language- extra-class"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[e._v("mkdir spring-samples\ncd spring-samples\nsvn co https://src.springframework.org/svn/spring-samples/webflow-showcase\ncd webflow-showcase\nmvn package\n# import into Eclipse\n\n")])])]),r("h2",{attrs:{id:"_2-4-spring-web-flow-2-2"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-4-spring-web-flow-2-2"}},[e._v("#")]),e._v(" 2.4. Spring Web Flow 2.2")]),e._v(" "),r("h3",{attrs:{id:"_2-4-1-jsf-2-support"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-4-1-jsf-2-support"}},[e._v("#")]),e._v(" 2.4.1. JSF 2 Support")]),e._v(" "),r("h4",{attrs:{id:"comprehensive-jsf-2-support"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#comprehensive-jsf-2-support"}},[e._v("#")]),e._v(" Comprehensive JSF 2 Support")]),e._v(" "),r("p",[e._v("Building on 2.1, Spring Web Flow version 2.2 adds support for core JSF 2 features\nThe following features that were not supported in 2.1 are now available:\npartial state saving, JSF 2 resource request, handling, and JSF 2 Ajax requests.\nAt this point support for JSF 2 is considered\ncomprehensive although not covering every JSF 2 feature --\nexcluded are mostly features that overlap with the core value Web Flow provides\nsuch as those relating to navigation and state management.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/en/spring-web-flow/spring-faces.html#spring-faces-webflow-config"}},[e._v("Section 13.3, “Configuring Web Flow for use with JSF”")]),e._v(" for important configuration changes.\nNote that partial state saving is only supported with Sun Mojarra 2.0.3 or later.\nIt is not yet supported with Apache MyFaces. This is due to the\nfact MyFaces was not as easy to customize with regards to how component state is stored.\nWe will work with Apache MyFaces to provide this support. In the mean time you will need to use\nthe "),r("code",[e._v("javax.faces.PARTIAL_STATE_SAVING")]),e._v(" context parameter in "),r("code",[e._v("web.xml")]),e._v("to disable partial state saving with Apache MyFaces.")],1),e._v(" "),r("h4",{attrs:{id:"travel-sample-with-the-primefaces-components"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#travel-sample-with-the-primefaces-components"}},[e._v("#")]),e._v(" Travel Sample With the PrimeFaces Components")]),e._v(" "),r("p",[e._v("The main Spring Travel sample demonstrating Spring Web Flow and JSF support\nis now built on JSF 2 and components from the PrimeFaces component library.\nPlease check out the booking-faces sample in the distribution.")]),e._v(" "),r("p",[e._v("Additional samples can be found at the Spring Web Flow - Prime Faces"),r("a",{attrs:{href:"https://src.springframework.org/svn/spring-samples/webflow-primefaces-showcase",target:"_blank",rel:"noopener noreferrer"}},[e._v("Showcase"),r("OutboundLink")],1),e._v(", an SVN repository within the"),r("a",{attrs:{href:"https://src.springframework.org/svn/spring-samples",target:"_blank",rel:"noopener noreferrer"}},[e._v("spring-samples"),r("OutboundLink")],1),e._v("repository. Use these commands to check out and build:")]),e._v(" "),r("div",{staticClass:"language- extra-class"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[e._v("svn co https://src.springframework.org/svn/spring-samples/webflow-primefaces-showcase\n\tcd webflow-primefaces-showcase\n\tmvn package\n\t\n")])])]),r("h3",{attrs:{id:"_2-4-2-spring-security-facelets-tag-library"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-4-2-spring-security-facelets-tag-library"}},[e._v("#")]),e._v(" 2.4.2. Spring Security Facelets Tag Library")]),e._v(" "),r("p",[e._v("A new Spring Security tag library is available for use with with JSF 2.0 or with JSF 1.2 Facelets views.\nIt provides an <authorize> tag as well as several EL functions.\nSee "),r("RouterLink",{attrs:{to:"/en/spring-web-flow/spring-faces.html#spring-faces-security-taglib"}},[e._v("Section 13.9, “Using the Spring Security Facelets Tag Library”")]),e._v(" for more details.")],1),e._v(" "),r("h3",{attrs:{id:"_2-4-3-spring-javascript-updates"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-4-3-spring-javascript-updates"}},[e._v("#")]),e._v(" 2.4.3. Spring JavaScript Updates")]),e._v(" "),r("h4",{attrs:{id:"deprecated-resourcesservlet"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#deprecated-resourcesservlet"}},[e._v("#")]),e._v(" Deprecated ResourcesServlet")]),e._v(" "),r("p",[e._v("Starting with Spring 3.0.4, the Spring Framework includes\na replacement for the ResourcesServlet. Please see\nthe Spring Framework documentation for details on the custom mvc namespace,\nspecifically the new"),r("a",{attrs:{href:"http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/mvc.html#mvc-static-resources",target:"_blank",rel:"noopener noreferrer"}},[e._v('"resources"'),r("OutboundLink")],1),e._v("element.")]),e._v(" "),r("h4",{attrs:{id:"dojo-1-5-and-dojox"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#dojo-1-5-and-dojox"}},[e._v("#")]),e._v(" Dojo 1.5 and dojox")]),e._v(" "),r("p",[e._v("The bundled custom Dojo build is upgraded to version 1.5. It now includes dojox.")]),e._v(" "),r("p",[e._v("Note that applications are generally encouraged to prepare their own custom\nDojo build for optimized performance depending on what parts of Dojo are\ncommonly used together. For examples see the"),r("a",{attrs:{href:"https://src.springframework.org/svn/spring-webflow/branches/spring-webflow-2.2-maintenance/spring-js-resources/scripts/dojo",target:"_blank",rel:"noopener noreferrer"}},[e._v("scripts"),r("OutboundLink")],1),e._v("used by Spring Web Flow to prepare its own custom Dojo build.")]),e._v(" "),r("h4",{attrs:{id:"two-spring-js-artifacts"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#two-spring-js-artifacts"}},[e._v("#")]),e._v(" Two Spring JS artifacts")]),e._v(" "),r("p",[e._v("The "),r("code",[e._v("spring-js")]),e._v(" artifact has been split in two -- the new artifact\n("),r("code",[e._v("spring-js-resources")]),e._v(") contains client side resource (.js, .css, etc.) while\nthe existing artifact ("),r("code",[e._v("spring-js")]),e._v(") contains server-side Java code only.")]),e._v(" "),r("p",[e._v("Applications preparing their own custom Dojo build have an option now to\navoid including "),r("code",[e._v("spring-js-resources")]),e._v(" and put "),r("code",[e._v("Spring.js")]),e._v(" and"),r("code",[e._v("Spring-Dojo.js")]),e._v(" directly under the root of their web application.")]),e._v(" "),r("h4",{attrs:{id:"client-resources-moved-into-meta-inf-web-resources"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#client-resources-moved-into-meta-inf-web-resources"}},[e._v("#")]),e._v(" Client resources moved into META-INF/web-resources")]),e._v(" "),r("p",[e._v("Bundled client resources (.js, .css, etc.)\nhave been moved to "),r("code",[e._v("META-INF/web-resources")]),e._v(" from their previous location\nunder "),r("code",[e._v("META-INF")]),e._v(". This change is transparent for applications but will result\nin simpler and safer configuration when using the new resource handling\nmechanism available in Spring 3.0.4.")]),e._v(" "),r("h3",{attrs:{id:"_2-4-4-jsf-portlet-support"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-4-4-jsf-portlet-support"}},[e._v("#")]),e._v(" 2.4.4. JSF Portlet Support")]),e._v(" "),r("h4",{attrs:{id:"portlet-api-2-0-and-jsf-1-2-support"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#portlet-api-2-0-and-jsf-1-2-support"}},[e._v("#")]),e._v(" Portlet API 2.0 and JSF 1.2 support")]),e._v(" "),r("p",[e._v("In previous versions of Spring Web Flow support for JSF Portlets relied on\na Portlet Bridge for JSF implementation and was considered experimental.\nSpring Web Flow 2.2 adds support for JSF Portlets based on its own internal\nPortlet integration targeting Portlet API 2.0 and JSF 1.2 environments.\nSee "),r("a",{attrs:{href:""}},[e._v("???")]),e._v(" for more details.\nThe Spring Web Flow Travel JSF Portlets sample has been successfully\ntested on the Apache Pluto portal container.")])])}),[],!1,null,null,null);t.default=s.exports}}]);