|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<appendix xml:id="migration-3.2" |
| 3 | + xmlns="http://docbook.org/ns/docbook" version="5.0" |
| 4 | + xmlns:xl="http://www.w3.org/1999/xlink" |
| 5 | + xmlns:xi="http://www.w3.org/2001/XInclude" |
| 6 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 7 | + xsi:schemaLocation=" |
| 8 | + http://docbook.org/ns/docbook http://www.docbook.org/xml/5.0/xsd/docbook.xsd |
| 9 | + http://www.w3.org/1999/xlink http://www.docbook.org/xml/5.0/xsd/xlink.xsd"> |
| 10 | + <title>Migrating to Spring Framework 3.2</title> |
| 11 | + |
| 12 | + <para>In this appendix we discuss discuss what users will want to know when upgrading to |
| 13 | + Spring Framework 3.2. For a general overview of features, please see |
| 14 | + <xref linkend="new-in-3.2"/></para> |
| 15 | + |
| 16 | + <section xml:id="migration-3.2-new-optional-deps"> |
| 17 | + <title>Newly optional dependencies</title> |
| 18 | + <para>Certain inter-module dependencies are now <literal>optional</literal> at the |
| 19 | + Maven POM level where they were once required. For example, <literal>spring-tx</literal> |
| 20 | + and its dependence on <literal>spring-context</literal>. This may result in <literal> |
| 21 | + ClassNotFoundErrors</literal> or other similar problems for users that have been relying |
| 22 | + on transitive dependency management to pull in affected downstream <literal>spring-* |
| 23 | + </literal>. To resolve this problem, simply add the appropriate missing jars to your |
| 24 | + build configuration.</para> |
| 25 | + </section> |
| 26 | + |
| 27 | + <section xml:id="migration-3.2-inline-asm"> |
| 28 | + <title>Inlining of spring-asm jar</title> |
| 29 | + <para>In versions 3.0 and 3.1, we published a discrete <literal>spring-asm</literal> |
| 30 | + containing repackaged <literal>org.objectweb.asm</literal> 3.x sources. As of Spring |
| 31 | + Framework 3.2, we have upgraded to <literal>org.objectweb.asm</literal> 4.0 and done |
| 32 | + away with the separate module jar, favoring inlining these classes directly within |
| 33 | + <literal>spring-core</literal>. This should cause no migration issue for most users; |
| 34 | + but on the off chance that you have <literal>spring-asm</literal> declared directly |
| 35 | + within your project's build script, you'll want to remove it when upgrading to |
| 36 | + Spring Framework 3.2.</para> |
| 37 | + </section> |
| 38 | + |
| 39 | + <section xml:id="migration-3.2-inline-cglib"> |
| 40 | + <title>Explicit CGLIB dependency no longer required</title> |
| 41 | + <para>In prior versions, users of Spring's subclass-based AOP proxies (e.g. via |
| 42 | + <literal>proxy-target-class="true"</literal>) and <literal>@Configuration</literal> |
| 43 | + class support were required to declare an explicit dependency on CGLIB 2.2. As of |
| 44 | + Spring Framework 3.2, we now repackage and inline the newly-released CGLIB 3.0.</para> |
| 45 | + <para>This means greater convenience for users, as well as correct functionality for |
| 46 | + Java 7 users who are creating subclass proxies of types that contain <literal> |
| 47 | + invokedynamic</literal> bytecode instructions. Repackaging CGLIB internally ensures |
| 48 | + no classpath conflicts with other third party frameworks that may depend on other |
| 49 | + versions of CGLIB.</para> |
| 50 | + </section> |
| 51 | + |
| 52 | + <section xml:id="migration-3.2-osgi-users"> |
| 53 | + <title>For OSGi users</title> |
| 54 | + <para>OSGi metadata is no longer published within individual Spring Framework |
| 55 | + jar MANIFEST.MF files. Please see this |
| 56 | + <link xl:href="http://www.springsource.org/springframework-ebr">announcement</link> |
| 57 | + for more information about how users can get OSGi-ready versions of Spring |
| 58 | + Framework 3.2 jars.</para> |
| 59 | + </section> |
| 60 | + |
| 61 | + <section xml:id="migration-3.2-compatibility-mvc-config"> |
| 62 | + <title>MVC Java Config and MVC Namespace</title> |
| 63 | + |
| 64 | + <para>As explained in <xref linkend="mvc-config-content-negotiation"/>, both |
| 65 | + the MVC Java config and the MVC namespace register extensions such as |
| 66 | + <filename>.json</filename> and <filename>.xml</filename> if the |
| 67 | + corresponding classpath dependencies are present. That means controller |
| 68 | + methods may now return JSON or XML formatted content if those |
| 69 | + extensions are present in the request URI, |
| 70 | + even if the 'Accept' header doesn't request those media types.</para> |
| 71 | + |
| 72 | + <para>The newly added support for matrix variables is explained in |
| 73 | + <xref linkend="mvc-ann-matrix-variables"/>. To preserve backward |
| 74 | + compatibility, by default, semicolon content is removed from incoming |
| 75 | + request URIs and therefore <interfacename>@MatrixVariable</interfacename> |
| 76 | + cannot be used without additional configuration. However, when using |
| 77 | + the MVC Java config and the MVC namespace, semicolon content is left |
| 78 | + in the URI so that matrix variables are automatically supported. |
| 79 | + The removal of semicolon content is controlled through the |
| 80 | + <classname>UrlPathHelper</classname> property of |
| 81 | + <classname>RequestMappingHandlerMapping</classname>.</para> |
| 82 | + </section> |
| 83 | + |
| 84 | + <section xml:id="migration-3.2-compatibility-uri-variable-values"> |
| 85 | + <title>Decoding of URI Variable Values</title> |
| 86 | + <para>URI variable values now get decoded when |
| 87 | + <code>UrlPathHelper.setUrlDecode</code> is set to <code>false</code>. |
| 88 | + See <link xl:href="https://jira.springsource.org/browse/SPR-9098">SPR-9098</link>.</para> |
| 89 | + </section> |
| 90 | + |
| 91 | + <section xml:id="migration-3.2-compatibility-http-patch"> |
| 92 | + <title>HTTP PATCH method</title> |
| 93 | + <para>The <classname>DispatcherServlet</classname> now allows the |
| 94 | + HTTP PATCH method where previously it didn't.</para> |
| 95 | + </section> |
| 96 | + |
| 97 | + <section xml:id="migration-3.2-compatibility-tiles3"> |
| 98 | + <title>Tiles 3</title> |
| 99 | + |
| 100 | + <para>Besides the version number change, the set of Tiles |
| 101 | + dependencies has also changed. You will need to have a subset or all of |
| 102 | + <filename>tiles-request-api</filename>, <filename>tiles-api</filename>, |
| 103 | + <filename>tiles-core</filename>, <filename>tiles-servlet</filename>, |
| 104 | + <filename>tiles-jsp</filename>, <filename>tiles-el</filename>. |
| 105 | + </para> |
| 106 | + </section> |
| 107 | + |
| 108 | + <section xml:id="migration-3.2-compatibility-spring-mvc-test"> |
| 109 | + <title>Spring MVC Test standalone project</title> |
| 110 | + |
| 111 | + <para>If migrating from the |
| 112 | + <link xl:href="https://github.com/SpringSource/spring-test-mvc">spring-test-mvc</link> |
| 113 | + standalone project to the <filename>spring-test</filename> module in |
| 114 | + Spring Framework 3.2, you will need to adjust the root package |
| 115 | + to be <classname>org.springframework.test.web.servlet</classname>.</para> |
| 116 | + |
| 117 | + <para>You will no longer be able to use the |
| 118 | + <classname>MockMvcBuilders</classname> <code>annotationConfigSetup</code> |
| 119 | + and <code>xmlConfigSetup</code> options. Instead you'll need to switch |
| 120 | + to using the <interfacename>@WebApplicationContext</interfacename> support |
| 121 | + of <filename>spring-test</filename> for loading Spring configuration, |
| 122 | + then inject a <interfacename>WebApplicationContext</interfacename> into |
| 123 | + the test and use it to create a <classname>MockMvc</classname>. |
| 124 | + <xref linkend="spring-mvc-test-framework" /> for details.</para> |
| 125 | + </section> |
| 126 | + |
| 127 | + <section xml:id="migration-3.2-changes"> |
| 128 | + <title>Public API changes</title> |
| 129 | + |
| 130 | + <section xml:id="migration-3.2-api-changes"> |
| 131 | + <title>JDiff reports</title> |
| 132 | + Select JDiff reports are now being published to provide users with a convenient |
| 133 | + means of understanding what's changed between versions. Going forward these will be |
| 134 | + published between each minor version, e.g. from 3.1.3.RELEASE to 3.1.4.RELEASE; from |
| 135 | + the latest maintenance version to the latest GA release, e.g. |
| 136 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.1.3.RELEASE_to_3.2.0.RELEASE"> |
| 137 | + 3.1.3.RELEASE to 3.2.0.RELEASE</link>; and in between each milestone |
| 138 | + and/or RC for users who are tracking next-generation development, e.g. |
| 139 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RC2_to_3.2.0.RELEASE"> |
| 140 | + 3.2.0.RC2 to 3.2.0.RELEASE</link>. |
| 141 | + </section> |
| 142 | + |
| 143 | + <section xml:id="migration-3.2-removals-and-deprecations"> |
| 144 | + <title>Deprecations</title> |
| 145 | + <para>The following packages and types have been wholly or partially deprecated |
| 146 | + in Spring Framework 3.2 and may be removed in a future version. Click through |
| 147 | + to the linked Javadoc for each item for exact details. See also the |
| 148 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/deprecated-list.html"> |
| 149 | + complete list of deprecations</link> in the framework.</para> |
| 150 | + <itemizedlist> |
| 151 | + <listitem> |
| 152 | + <para> |
| 153 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/orm/ibatis/package-summary.html"> |
| 154 | + org.springframework.orm.ibatis</link> |
| 155 | + </para> |
| 156 | + </listitem> |
| 157 | + <listitem> |
| 158 | + <para> |
| 159 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/scheduling/backportconcurrent/package-summary.html"> |
| 160 | + org.springframework.scheduling.backportconcurrent</link> |
| 161 | + </para> |
| 162 | + </listitem> |
| 163 | + <listitem> |
| 164 | + <para> |
| 165 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/ejb/support/package-summary.html"> |
| 166 | + org.springframework.ejb.support</link> |
| 167 | + </para> |
| 168 | + </listitem> |
| 169 | + <listitem> |
| 170 | + <para> |
| 171 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/http/converter/xml/XmlAwareFormHttpMessageConverter.html"> |
| 172 | + org.springframework.http.converter.xml.XmlAwareFormHttpMessageConverter</link> |
| 173 | + </para> |
| 174 | + </listitem> |
| 175 | + <listitem> |
| 176 | + <para> |
| 177 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/web/jsf/DelegatingVariableResolver.html"> |
| 178 | + org.springframework.web.jsf.DelegatingVariableResolver</link> |
| 179 | + </para> |
| 180 | + </listitem> |
| 181 | + <listitem> |
| 182 | + <para> |
| 183 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/web/jsf/SpringBeanVariableResolver.html"> |
| 184 | + org.springframework.web.jsf.SpringBeanVariableResolver</link> |
| 185 | + </para> |
| 186 | + </listitem> |
| 187 | + <listitem> |
| 188 | + <para> |
| 189 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/ui/velocity/CommonsLoggingLogSystem.html"> |
| 190 | + org.springframework.ui.velocity.CommonsLoggingLogSystem</link> |
| 191 | + </para> |
| 192 | + </listitem> |
| 193 | + <listitem> |
| 194 | + <para> |
| 195 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/ui/velocity/VelocityEngineUtils.html"> |
| 196 | + org.springframework.ui.velocity.VelocityEngineUtils</link> |
| 197 | + </para> |
| 198 | + </listitem> |
| 199 | + <listitem> |
| 200 | + <para> |
| 201 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/beans/factory/config/BeanReferenceFactoryBean.html"> |
| 202 | + org.springframework.beans.factory.config.BeanReferenceFactoryBean</link> |
| 203 | + </para> |
| 204 | + </listitem> |
| 205 | + <listitem> |
| 206 | + <para> |
| 207 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/beans/factory/config/CommonsLogFactoryBean.html"> |
| 208 | + org.springframework.beans.factory.config.CommonsLogFactoryBean</link> |
| 209 | + </para> |
| 210 | + </listitem> |
| 211 | + <listitem> |
| 212 | + <para> |
| 213 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.html"> |
| 214 | + org.springframework.beans.instrument.classloading.oc4j.OC4JLoadTimeWeaver</link> |
| 215 | + </para> |
| 216 | + </listitem> |
| 217 | + <listitem> |
| 218 | + <para> |
| 219 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/transaction/jta/OC4JJtaTransactionManager.html"> |
| 220 | + org.springframework.transaction.jta.OC4JJtaTransactionManager</link> |
| 221 | + </para> |
| 222 | + </listitem> |
| 223 | + <listitem> |
| 224 | + <para> |
| 225 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/web/util/ExpressionEvaluationUtils.html"> |
| 226 | + org.springframework.web.util.ExpressionEvaluationUtils</link> |
| 227 | + </para> |
| 228 | + </listitem> |
| 229 | + <listitem> |
| 230 | + <para> |
| 231 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.html"> |
| 232 | + org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter</link> |
| 233 | + </para> |
| 234 | + </listitem> |
| 235 | + <listitem> |
| 236 | + <para> |
| 237 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.html"> |
| 238 | + org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver</link> |
| 239 | + </para> |
| 240 | + </listitem> |
| 241 | + <listitem> |
| 242 | + <para> |
| 243 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.html"> |
| 244 | + org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping</link> |
| 245 | + </para> |
| 246 | + </listitem> |
| 247 | + <listitem> |
| 248 | + <para> |
| 249 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/web/servlet/mvc/annotation/ServletAnnotationMappingUtils.html"> |
| 250 | + org.springframework.web.servlet.mvc.annotation.ServletAnnotationMappingUtils</link> |
| 251 | + </para> |
| 252 | + </listitem> |
| 253 | + <listitem> |
| 254 | + <para> |
| 255 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/jmx/support/MBeanRegistrationSupport.html"> |
| 256 | + org.springframework.jmx.support.MBeanRegistrationSupport</link> |
| 257 | + </para> |
| 258 | + </listitem> |
| 259 | + <listitem> |
| 260 | + <para> |
| 261 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/test/context/ContextConfigurationAttributes.html"> |
| 262 | + org.springframework.test.context.ContextConfigurationAttributes</link> |
| 263 | + </para> |
| 264 | + </listitem> |
| 265 | + <listitem> |
| 266 | + <para> |
| 267 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.html"> |
| 268 | + org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests</link> |
| 269 | + </para> |
| 270 | + </listitem> |
| 271 | + <listitem> |
| 272 | + <para> |
| 273 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/test/context/testng/AbstractTransactionalTestNGSpringContextTests.html"> |
| 274 | + org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests</link> |
| 275 | + </para> |
| 276 | + </listitem> |
| 277 | + <listitem> |
| 278 | + <para> |
| 279 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/test/jdbc/SimpleJdbcTestUtils.html"> |
| 280 | + org.springframework.test.jdbc.SimpleJdbcTestUtils</link> |
| 281 | + </para> |
| 282 | + </listitem> |
| 283 | + <listitem> |
| 284 | + <para> |
| 285 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/web/servlet/view/ContentNegotiatingViewResolver.html"> |
| 286 | + org.springframework.web.servlet.view.ContentNegotiatingViewResolver</link> |
| 287 | + </para> |
| 288 | + </listitem> |
| 289 | + <listitem> |
| 290 | + <para> |
| 291 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/transaction/interceptor/TransactionAspectUtils.html"> |
| 292 | + org.springframework.transaction.interceptor.TransactionAspectUtils</link> |
| 293 | + </para> |
| 294 | + </listitem> |
| 295 | + <listitem> |
| 296 | + <para> |
| 297 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/http/HttpStatus.html"> |
| 298 | + org.springframework.http.HttpStatus</link> |
| 299 | + </para> |
| 300 | + </listitem> |
| 301 | + <listitem> |
| 302 | + <para> |
| 303 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/web/util/UriUtils.html"> |
| 304 | + org.springframework.web.util.UriUtils</link> |
| 305 | + </para> |
| 306 | + </listitem> |
| 307 | + <listitem> |
| 308 | + <para> |
| 309 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/orm/jpa/vendor/TopLinkJpaDialect.html"> |
| 310 | + org.springframework.orm.jpa.vendor.TopLinkJpaDialect</link> |
| 311 | + </para> |
| 312 | + </listitem> |
| 313 | + <listitem> |
| 314 | + <para> |
| 315 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/orm/jpa/vendor/TopLinkJpaVendorAdapter.html"> |
| 316 | + org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter</link> |
| 317 | + </para> |
| 318 | + </listitem> |
| 319 | + <listitem> |
| 320 | + <para> |
| 321 | + <link xl:href="http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/javadoc-api/org/springframework/util/CachingMapDecorator.html"> |
| 322 | + org.springframework.orm.util.CachingMapDecorator</link> |
| 323 | + </para> |
| 324 | + </listitem> |
| 325 | + </itemizedlist> |
| 326 | + </section> |
| 327 | + </section> |
| 328 | +</appendix> |
0 commit comments