# nicefish-spring-boot **Repository Path**: leafMyCode/nicefish-spring-boot ## Basic Information - **Project Name**: nicefish-spring-boot - **Description**: NiceFish 对应的服务端代码,基于 SpringBoot+JPA+Shiro 。请不要吝惜你的⭐️ Star ⭐️,星星越多,动力越足。 - **Primary Language**: Java - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 60 - **Created**: 2023-10-14 - **Last Updated**: 2023-10-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
NiceFish(美人鱼) 是一个系列项目,目标是示范前后端分离的开发+部署模式。前端有3个版本:浏览器环境、移动端环境、Electron 环境;后端有2个版本:SpringBoot 版本和 SpringCloud 版本。
🚀🚀🚀请不要吝惜你的⭐️ Star ⭐️,星星越多,动力越足。🚀🚀🚀
## 1.简述 此项目为 NiceFish 的前端界面提供服务,以下两个版本的前端都已经对好接口: - 基于 Angular 框架的前端界面:http://git.oschina.net/mumu-osc/NiceFish/ - 基于 React 框架的前端界面:https://gitee.com/mumu-osc/NiceFish-React 推荐使用 React 版本,因为最近几个月这个版本向前改了很多。 **注意:本项目与具体的前端框架无关,所有接口都是 Restful 的,可以使用任意前端框架来接入。** ## 2.开发环境 | 名称 | 版本号 | 描述 | | --------------------- | ---------------------- | ------------------------------------------------- | | Spring Boot | 3.2 | 发布于 2023 年 7 月 | | JDK | OpenJDK 20 | Spring Boot 3.2 要求至少 Java 17,不再支持 Java 8 | | IDEA | 最新版本 | 无 | | Maven | 3.8 | Spring Boot 3.2 要求 Maven >=3.6 | | MySQL | >=5(or MariaDB >=10) | 其它版本没有测试兼容性 | | ElasticSearch(可选) | 8.9 | 8.9 是当前最新版,2023-08,其它版本没有测试兼容性 | **目前 Spring 各个模块的版本兼容性比较复杂,如果能成功启动,最好不要修改版本。** ## 3.用法 1. git clone https://gitee.com/mumu-osc/NiceFish-React.git 1. 用 IDEA 导入根目录下的 pom.xml 1. 在 MySQL 中执行 docs/nicefish-spring-boot.sql 脚本(包含测试数据) 1. 修改 application.yml 配置文件,把 MySQL 改成你自己的配置 1. 修改 application.yml 配置文件,把上传文件的目录 uploadPath 改成你本地的目录 1. 配置 Maven ,使用阿里云的源 1. 启动 nicefish-cms 模块下的主类 NiceFishCMSApplication.java 1. druid 监控地址:http://localhost:8080/druid/sql.html [可选]:启用 ElasticSearch 搜索服务 1. 按照 ElasticSearch 官方文档安装配置 ES: https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html 1. 按照 ElasticSearch 官方文档安装配置 logstash: https://www.elastic.co/guide/en/logstash/8.9/installing-logstash.html 1. 按照官方文档完成 logstash 与 ElasticSearch 的对接 1. 参考本项目中的 /docs/elastic-mysql-jdbc.conf 配置文件配置 logstash 并重启服务,注意修改其中的 IP 地址、端口号、用户名和密码 1. 修改 nicefish-elastic-search 模块下的 application.yml 配置文件,把 ElasticSearch 的 IP 地址和端口号改成你自己的 1. 启动 nicefish-elastic-search 模块下的 NiceFishSearchApplication.java 1. 打开浏览器,访问 http://localhost:8899/nicefish/search/user/get-all ,测试搜索服务是否正常,注意改成你自己本地的配置 1. 在前端项目中设置代理,把带有 /search 前缀的服务全部代理给 nicefish-elastic-search 的服务 ## 4.项目模块依赖关系