Changed dependency for Spring Security to latest release of 3.1.4.RELEASE. Explicitly set spring core dependency in build.gradle and pom.xml to prevent build errors in SpringService call to setActiveProfiles() to prevent spring security from pulling wrong version of spring-core down.