快速搭建JAVA企业级开发环境,基于tomcat9,maven3.6,JDK8可改JDK13,IDEA2019。

本文详述了如何在Windows和Linux环境下搭建JAVA开发和部署环境。在Windows下,涉及下载并配置IDEA、JDK8、Tomcat9和Maven3.6。在Linux(CentOS)下,主要介绍JAVA、Tomcat和MySQL的安装及配置。同时,文章还解决了Windows中Tomcat日志乱码问题,并提供了部分便捷设置的建议。
摘要由CSDN通过智能技术生成

Windows下搭建开发环境

  1. 下载
    首先官网下载IDEA,tomcat,maven,IDEA自带JDK11,但是大部分企业和很多开源项目都用的JDK8,为了兼容性问题,再下载一个JDK8。
  2. 配置JAVA开发环境
    这里值得一提的是,安装JDK8时如果出现两次安装的提示,其实第一次安装的是JDK,后一次选择安装JRE的目录,查看bin目录下是否有javac程序就知道哪个是JDK了,然后直接把另外一个没用的JRE文件夹删了就行了。
    在这里插入图片描述
    在这里插入图片描述
    检验一下。
    在这里插入图片描述
  3. 简单配置一下IDEA
    在这里插入图片描述
    不改的话IDEA默认是集成了Maven3的,但我想改成自己的便于管理,所以改掉了IDEA默认集成的Maven。
    在这里插入图片描述
    -Dmaven.multiModuleProjectDirectory=$MAVEN_HOME
    在这里插入图片描述
  4. 简单配置一下Maven
    在这里插入图片描述
    http://maven.aliyun.com/nexus/content/groups/public/
    在这里插入图片描述

在这里插入图片描述
注释里面都写了样例配置,直接复制粘贴下来改就行了,唯一注意的就是不要写在注释里面去了。

<?xml version="1.0" encoding="UTF-8"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<!--
 | This is the configuration file for Maven. It can be specified at two levels:
 |
 |  1. User Level. This settings.xml file provides configuration for a single user,
 |                 and is normally provided in ${user.home}/.m2/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -s /path/to/user/settings.xml
 |
 |  2. Global Level. This settings.xml file provides configuration for all Maven
 |                 users on a machine (assuming they're all using the same Maven
 |                 installation). It's normally provided in
 |                 ${maven.conf}/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -gs /path/to/global/settings.xml
 |
 | The sections in this sample file are intended to give you a running start at
 | getting the most out of your Maven installation. Where appropriate, the default
 | values (values used when the setting is not specified) are provided.
 |
 |-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
  
  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值