Java SpringBoot 手记

SpringBoot Git:https://github.com/spring-projects/spring-boot

 

Maven (mvn)环境配置:

下载地址:http://maven.apache.org/download.cgi

配置环境变量

新建系统变量 MAVEN_HOME,变量值:E:\Maven\apache-maven-3.3.9

编辑系统变量 Path,添加变量值:;%MAVEN_HOME%\bin

注意:注意多个值之间需要有分号隔开,然后点击确定。

参考:https://www.runoob.com/maven/maven-setup.html

 

修改源

切换阿里镜像

<mirrors>
    <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>        
    </mirror>
</mirrors>

以上需要配置在setting.xml文件中,一般在用户目录的【.m2】目录中,如果是mac,就是 ~/.m2/setting.xml,如果是windows,用户admin就在【用户\admin.m2\】目录中,如果没有这个文件,就需要在maven的配置文件中配置,然后创建一个。

这里说一下setting.xml的和项目pom.xml中的标签: 
是镜像地址,为整个maven使用,一般每个国家地区配置,类似cdn的效果。是没有搭建私有仓库的公司首选。 
是远程仓库,例如某个公司自己搭建的私有仓库地址,也是为了提高速度,有一定经济实力的公司在内网提供的仓库地址。

完整Maven国内源配置(阿里源)全网最优方案,不服来辩:https://blog.csdn.net/m0_37566718/article/details/86978890

<mirrors>

	<mirror>
        <id>aliyun-public</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun public</name>
        <url>https://maven.aliyun.com/repository/public</url>
    </mirror>

    <mirror>
        <id>aliyun-central</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun central</name>
        <url>https://maven.aliyun.com/repository/central</url>
    </mirror>

    <mirror>
        <id>aliyun-spring</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun spring</name>
        <url>https://maven.aliyun.com/repository/spring</url>
    </mirror>

    <mirror>
        <id>aliyun-spring-plugin</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun spring-plugin</name>
        <url>https://maven.aliyun.com/repository/spring-plugin</url>
    </mirror>

    <mirror>
        <id>aliyun-apache-snapshots</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun apache-snapshots</name>
        <url>https://maven.aliyun.com/repository/apache-snapshots</url>
    </mirror>

    <mirror>
        <id>aliyun-google</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun google</name>
        <url>https://maven.aliyun.com/repository/google</url>
    </mirror>

    <mirror>
        <id>aliyun-gradle-plugin</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun gradle-plugin</name>
        <url>https://maven.aliyun.com/repository/gradle-plugin</url>
    </mirror>

    <mirror>
        <id>aliyun-jcenter</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun jcenter</name>
        <url>https://maven.aliyun.com/repository/jcenter</url>
    </mirror>

    <mirror>
        <id>aliyun-releases</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun releases</name>
        <url>https://maven.aliyun.com/repository/releases</url>
    </mirror>

    <mirror>
        <id>aliyun-snapshots</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun snapshots</name>
        <url>https://maven.aliyun.com/repository/snapshots</url>
    </mirror>

    <mirror>
        <id>aliyun-grails-core</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun grails-core</name>
        <url>https://maven.aliyun.com/repository/grails-core</url>
    </mirror>

    <mirror>
        <id>aliyun-mapr-public</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun mapr-public</name>
        <url>https://maven.aliyun.com/repository/mapr-public</url>
    </mirror>

  </mirrors>

  

Spring Boot【快速入门】:https://www.cnblogs.com/wmyskxz/p/9010832.html

SpringBoot视频教程(idea版):https://www.bilibili.com/video/av38657363/?p=1
Spring Boot文档:https://qbgbook.gitbooks.io/spring-boot-reference-guide-zh/content/I.%20Spring%20Boot%20Documentation/

mall框架:https://github.com/macrozheng/mall   文档:https://macrozheng.github.io/mall-learning/#/database/mall_database_overview

springboot学习之路:https://blog.csdn.net/m0_37034294/article/category/9276607

 

插件

MyBatisCodeHelperPro  自动生成实体类和Mapper 

https://gejun123456.github.io/MyBatisCodeHelper-Pro/#/databaseToCrud

 

---------------------------------------------------------

关闭eureka注册中心

在applicatioon.properties文件中,配置如下代码即可

eureka.client.register-with-eureka=false
eureka.client.fetchRegistry=false
eureka.client.server.waitTimeInMsWhenSyncEmpty=0

  

 

posted @ 2019-10-23 18:13  程序生(Codey)  阅读(216)  评论(0编辑  收藏  举报