Spring Security(Third Edition)
上QQ阅读APP看书,第一时间看更新

Common problems

Many users have trouble with the initial implementation of Spring Security in their application. A few common issues and suggestions are listed next. We want to ensure that you can run the example application and follow along!

  • Make sure you can build and deploy the application before putting Spring Security in place.
  • Review some introductory samples and documentation on your servlet container if needed.
  • It's usually easiest to use an IDE, such as Eclipse, to run your servlet container. Not only is deployment typically seamless, but the console log is also readily available to review for errors. You can also set breakpoints at strategic locations, to be triggered by exceptions to better diagnose errors.
  • Make sure the versions of Spring and Spring Security that you're using match and that there aren't any unexpected Spring JARs remaining as part of your application. As previously mentioned, when using Gradle, it can be a good idea to declare the Spring dependencies in the dependency management section.