SystemUtils.java 485 B

1234567891011121314151617181920212223242526
  1. /**
  2. *
  3. */
  4. package cn.com.lzt.common.util;
  5. /**
  6. * @author xzx
  7. *
  8. * 2019年6月25日
  9. *
  10. */
  11. public class SystemUtils {
  12. /**
  13. * 通过操作系统判断是否为调试环境
  14. * @return
  15. */
  16. public static boolean isDebugEnvirementByOS() {
  17. String os = System.getProperty("os.name");
  18. if(os.toLowerCase().startsWith("win") || os.toLowerCase().startsWith("mac")){
  19. System.out.println("=========判断为非生产环境===========");
  20. return true;
  21. }
  22. return false;
  23. }
  24. }