# oshi-demo **Repository Path**: xccit/oshi-demo ## Basic Information - **Project Name**: oshi-demo - **Description**: OSHI监控系统状态实例 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-12-28 - **Last Updated**: 2026-06-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Based on the code map, I can see this is a system monitoring application called "oshi-demo" with a Spring Boot backend and Vue.js frontend. Let me create the README: # oshi-demo 系统监控演示项目 | System Monitoring Demo ## 项目简介 oshi-demo 是一个基于 Spring Boot + Vue.js 的系统监控演示应用,使用 [OSHI](https://github.com/dblock/oshi) 库获取系统硬件信息,提供 CPU、内存等系统监控功能。 oshi-demo is a system monitoring demo application built with Spring Boot + Vue.js, using the [OSHI](https://github.com/dblock/oshi) library to retrieve system hardware information, providing CPU, memory and other system monitoring features. ## 技术栈 ### 后端 Backend - Java 17 - Spring Boot - OSHI (Operating System and Hardware Information) ### 前端 Frontend - Vue 3 - Vite - Axios - Vue Router ## 功能特性 - CPU 信息监控 / CPU Information Monitoring - CPU 核心使用率 / CPU Core Usage Per Second - 跨域支持 / CORS Support ## 快速开始 ### 后端启动 ```bash # 编译项目 mvn clean package # 运行项目 mvn spring-boot:run ``` 服务启动后访问: http://localhost:8080 ### 前端启动 ```bash # 进入前端目录 cd oshi-front # 安装依赖 npm install # 开发模式运行 npm run dev # 生产环境构建 npm run build ``` 前端默认访问: http://localhost:5173 ## API 接口 | 接口 | 说明 | |------|------| | `GET /monitor/cpu/info` | 获取 CPU 信息 | | `GET /monitor/cpu/freq` | 获取 CPU 频率 | ## 项目结构 ``` oshi-demo/ ├── src/main/java/io/xccit/oshiapp/ │ ├── common/ │ │ ├── r/ # 响应结果封装 │ │ └── service/ # 业务服务接口 │ ├── config/ # 配置类 │ ├── controller/ # 控制器 │ └── util/ # 工具类 ├── oshi-front/ # Vue.js 前端 │ ├── src/ │ │ ├── api/ # API 接口 │ │ ├── components/# 组件 │ │ ├── views/ # 页面视图 │ │ └── utils/ # 工具函数 │ └── package.json └── pom.xml ``` ## 许可证 MIT License