SVN拉取代码部署至本地

2020-08-25  本文已影响0人  Soup_1acc

2020-08-25

公司OA系统采用springboot+vue,SVN拉取代码部署到本地。

前端


npm install

报错

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lx-vue-v1@0.1.0 serve: `vue-cli-service serve --mode dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lx-vue-v1@0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lixia\AppData\Roaming\npm-cache\_logs\2020-08-25T03_44_34_181Z-debug.log

清理缓存后再npm install成功
nmp run dev
启动vue

注意:安装时注意终端所在地址,将node_modle安装到项目底下。

后端


org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.lxtech.server.IntegratedApplication]; nested exception is java.io.FileNotFoundException: class path resource [cache.properties] cannot be opened because it does not exist
 at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:181) ~[spring-context-5.1.15.RELEASE.jar:5.1.15.RELEASE]
 at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:315) ~[spring-context-5.1.15.RELEASE.jar:5.1.15.RELEASE]
 at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232) ~[spring-context-5.1.15.RELEASE.jar:5.1.15.RELEASE]

因为是多环境所以有三个配置文件
无法通过maven配置找到打包的文件cache.properties(开发环境)

解决方案:
暂时建立一个单独的cache.properties文件到resources下,环境与开发环境配置一致
可以在本地正常运行但无法读取路径问题未解决

后端登录时无法登录
因为后端部署在服务器上,后端的localhost地址就是服务器本机地址
前端的请求地址已经改为服务器的地址
将后端部署到本机,前端请求的依然是服务器地址,而不是本机地址
所以请求被拦截

解决方案:将前端请求地址改为本机(localhost:端口)

上一篇 下一篇

猜你喜欢

热点阅读