折腾spring boot 应用
Posted celebrator
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了折腾spring boot 应用相关的知识,希望对你有一定的参考价值。
准备
服务器环境
centos7安装docker,使用tomcat镜像8.5,运行,并将webapps映射出来
docker run -d -p 60800:8080 --name tomcat -v=/mnt/raid1/docker/tomcat:/usr/local/tomcat/webapps tomcat:latest
开发环境
安装配置java环境
配置maven环境,修改镜像地址
<mirror> <id>aliyunmaven</id> <mirrorOf>*</mirrorOf> <name>阿里云公共仓库</name> <url>https://maven.aliyun.com/repository/public</url> </mirror> <!-- 中央仓库1 --> <mirror> <id>repo1</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://repo1.maven.org/maven2/</url> </mirror> <!-- 中央仓库2 --> <mirror> <id>repo2</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://repo2.maven.org/maven2/</url> </mirror>
配置vscode
安装
Spring Boot Extension Pack,Java Extension Pack,Maven for Java修改vscode配置文件:
"explorer.confirmDelete": false, "editor.suggestSelection": "first", "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", "java.errors.incompleteClasspath.severity": "ignore", "editor.minimap.enabled": false, "window.zoomLevel": 0, "workbench.editor.enablePreview": false, "workbench.editor.enablePreviewFromQuickOpen": false, "editor.renderIndentGuides": false, "editor.highlightActiveIndentGuide": false, "java.home": "C:\\Program Files\\AdoptOpenJDK\\jdk-11.0.4.11-hotspot", "editor.fontSize": 15, "editor.lineHeight": 30, "maven.executable.path": "E:\\StaticSoft\\apache-maven-3.6.1\\bin\\mvn.cmd", "java.configuration.maven.userSettings": "E:\\StaticSoft\\apache-maven-3.6.1\\conf\\settings.xml", "maven.terminal.customEnv": [ "environmentVariable": "JAVA_HOME", "value": "C:\\Program Files\\AdoptOpenJDK\\jdk-11.0.4.11-hotspot" ], "terminal.integrated.shell.linux": "/bin/bash", "java.jdt.ls.vmargs": "-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication"
以上是关于折腾spring boot 应用的主要内容,如果未能解决你的问题,请参考以下文章
(汇总)Spring Boot 实践折腾记 & Spring Boot 2.x 实践记
Spring Boot 实践折腾记:Spring Boot中的容器配置和SSL支持
Spring Boot 实践折腾记:三板斧,Spring Boot下使用Mybatis