title: How to upgrade Spring Security and Spring Security Oauth2 to the latest without breaking the application
body: <p>I have a spring rest application that uses spring-security-core version 4.0.3.RELEASE and spring-security-oauth2 version 2.0.8.RELEASE. The main Spring security core library version is 4.2.3.RELEASE.</p>
  
  <p>My security.xml file uses the following schemas:</p>
  
  <pre><code>&lt;beans:beans xmlns:sec="http://www.springframework.org/schema/security"
      xmlns:beans="http://www.springframework.org/schema/beans" xmlns:oauth2="http://www.springframework.org/schema/security/oauth2"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/security
  http://www.springframework.org/schema/security/spring-security-4.0.xsd
  http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans.xsd
  http://www.springframework.org/schema/security/oauth2
  http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd"&gt;
  </code></pre>
  
  <p>Looking at the dependencies, I see I have to change some of the xsd files as well to newer versions of it. Which I had tried. Once I got it working and the app was initializing then I've noticed that the security did not work anymore. Hence I knew I had to do some serious debugging.</p>
  
  <p>I've noticed that if I upgrade my POM to the latest versions of all these libraries my security does not work anymore.</p>
  
  <p>Therefore my question is: Is there any file that shows the diffs between the versions of those libraries so it can help me debugging what breaks when I upgrade those libraries to the latest ones?</p>
  
  <p>What is the advisable methodology to follow when doing such upgrade?</p>
  
  <p>It is not just a matter of saving time but a matter of trying to do that so that new bugs are not introduced. In fact, it would be nice also to know which of these libraries are compatible to which versions.</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
      &lt;artifactId&gt;spring-security-config&lt;/artifactId&gt;
      &lt;version&gt;${org.springframework.security-version}&lt;/version&gt;
      &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
      &lt;artifactId&gt;spring-security-core&lt;/artifactId&gt;
      &lt;version&gt;${org.springframework.security-version}&lt;/version&gt;
      &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
      &lt;artifactId&gt;spring-security-crypto&lt;/artifactId&gt;
      &lt;version&gt;${org.springframework.security-version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.security.oauth&lt;/groupId&gt;
      &lt;artifactId&gt;spring-security-oauth2&lt;/artifactId&gt;
      &lt;version&gt;${org.springframework.security.oauth2-version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
      &lt;artifactId&gt;spring-security-taglibs&lt;/artifactId&gt;
      &lt;version&gt;${org.springframework.security-version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
      &lt;artifactId&gt;spring-security-web&lt;/artifactId&gt;
      &lt;version&gt;${org.springframework.security-version}&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Thanks,</p>
  
  <p>C.</p>