更新时间: 2024-11-13 05:06:32#springboot 若依前后分离项目,打包成一个jar 运行#前后端操作https://blog.csdn.net/qq_40622375/article/details/143467032 走nginx https://blog.csdn.net/zwz1342/article/details/139866631 不走nginx , 需要补充第一个链接里的 @RequestMapping("/") 注释掉 改变前端打包路径 outputDir: '../RuoYi-Vue-Oracle-master/src/main/resources/dist' 改为后端对应resource目录 主要参考上边第二个链接, 正常直接用static 目录更好点。 这里已经跑起来了,懒得折腾了... #解决vue、springboot项目打包后刷新出现404的问题https://blog.csdn.net/darabiuz/article/details/122908160 package com.ruoyi.framework; import org.springframework.boot.web.server.ErrorPage; import org.springframework.boot.web.server.ErrorPageRegistrar; import org.springframework.boot.web.server.ErrorPageRegistry; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Component; @Component public class ErrorConfig implements ErrorPageRegistrar { @Override public void registerErrorPages(ErrorPageRegistry registry) { ErrorPage error404Page = new ErrorPage(HttpStatus.NOT_FOUND, "/"); registry.addErrorPages(error404Page); } } #若依关闭redishttps://developer.aliyun.com/article/1294496 #引入mybatis-plushttps://doc.ruoyi.vip/ruoyi/document/cjjc.html#%E9%9B%86%E6%88%90mybatis-plus%E5%AE%9E%E7%8E%B0mybatis%E5%A2%9E%E5%BC%BA #新建项目 通用改动点https://blog.csdn.net/qq_52319557/article/details/132165014