Example usage for org.springframework.security.core SpringSecurityCoreVersion getVersion

List of usage examples for org.springframework.security.core SpringSecurityCoreVersion getVersion

Introduction

In this page you can find the example usage for org.springframework.security.core SpringSecurityCoreVersion getVersion.

Prototype

public static String getVersion() 

Source Link

Usage

From source file:org.springframework.security.config.SecurityNamespaceHandler.java

public SecurityNamespaceHandler() {
    String coreVersion = SpringSecurityCoreVersion.getVersion();

    Package pkg = SpringSecurityCoreVersion.class.getPackage();

    if (pkg == null || coreVersion == null) {
        logger.info("Couldn't determine package version information.");
        return;/*  w  w w  .  j av  a 2 s .co  m*/
    }

    String version = pkg.getImplementationVersion();
    logger.info("Spring Security 'config' module version is " + version);

    if (version.compareTo(coreVersion) != 0) {
        logger.error(
                "You are running with different versions of the Spring Security 'core' and 'config' modules");
    }
}