Java 类org.hibernate.validator.internal.util.Version 实例源码

项目:kloudmake    文件:Cli.java   
@SuppressWarnings("unchecked")
public static void configureLogging(Level level) {
    ch.qos.logback.classic.Logger valverlog = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Version.class);
    valverlog.setLevel(ERROR);
    ch.qos.logback.classic.Logger reflog = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Reflections.class);
    reflog.setLevel(ERROR);
    ch.qos.logback.classic.Logger logger = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger("ROOT");
    LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
    ConsoleAppender console = (ConsoleAppender) logger.getAppender("console");
    logger.setLevel(level);
    console.stop();
    PatternLayout pl = new PatternLayout();
    pl.setPattern("%r %5p [%X{resource}] %m%n%nopex");
    pl.setContext(lc);
    pl.start();
    console.setLayout(pl);
    console.start();
}
项目:hibernate-demos    文件:HikeRepositoryIT.java   
@Test
public void testValidation() {
    assertEquals( "6.0.0.Alpha1", Version.getVersionString() );

}