版本工具类

This commit is contained in:
SanLi
2020-07-14 18:59:04 +08:00
parent b7b63c129e
commit 03f4359a97

View File

@@ -0,0 +1,38 @@
/*
* screw - 简洁好用的数据库表结构文档生成工具
* Copyright © 2020 SanLi (qinggang.zuo@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package cn.smallbun.screw.dashboard.utils;
/**
* 版本工具类
* @author SanLi
* Created by qinggang.zuo@gmail.com / 2689170096@qq.com on 2020/7/14 18:54
*/
public class AppVersionUtils {
private AppVersionUtils() {
}
/**
*
* @param aClass Class
* @return 版本
*/
public static String getVersion(Class<?> aClass) {
Package pkg = aClass.getPackage();
return (pkg != null) ? pkg.getImplementationVersion() : null;
}
}