首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >SpringBoot简介

SpringBoot简介

作者头像
DataScience
发布2020-01-02 12:07:04
2840
发布2020-01-02 12:07:04
举报
文章被收录于专栏:A2DataA2Data

本文标识 : Jsbt0000

本文编辑 : Jack 风

编程工具 : IDEA

阅读时长 : 6分钟

1、Spring Boot 简介

简化Spring应用开发的一个框架; 整个Spring技术栈的一个大整合; J2EE开发的一站式解决方案;

2、微服务

2014,martin fowler

微服务:架构风格(服务微化)

一个应用应该是一组小型服务;可以通过HTTP的方式进行互通;

单体应用:ALL IN ONE

微服务:每一个功能元素最终都是一个可独立替换和独立升级的软件单元;

详细参照微服务文档

https://martinfowler.com/articles/microservices.html#MicroservicesAndSoa

3、环境准备

SpringBoot2.0环境约束

  • jdk1.8+;java version "1.8.0_112" maven 3.3+;Apache Maven 3.5.4 A favorite text editor or IDE:IntelliJ IDEA 2018.2.6 SpringBoot 2.1.1.RELEASE

统一环境;

4、Maven配置

$M2_HOME\conf\settings.xml 配置文件t添加如下内容

  • 在<mirrors></mirrors>之间添加如下内容
  • 作用:国内maven仓库镜像(众所周知的原因国内不能很好的访问maven中央仓库)
<mirror>
    <id>alimaven</id>
    <name>aliyun maven</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
    <mirrorOf>central</mirrorOf>        
</mirror>
  • 在<profiles></profiles>之间添加如下内容
  • 作用:指定项目编译运行使用的JDK版本
<profile>
    <id>jdk-1.8</id>
    <activation>
        <jdk>1.8</jdk>
        <activeByDefault>true</activeByDefault>
    </activation>
    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
    </properties>
    <!-- 如果是在学校或公司有maven私服,可以在这里配置私服 -->
    <repositories>
        <repository>
            <id>accp</id>
            <name>accp</name>
            <url>http://192.168.1.48:8081/repository/accp/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>
    <!-- 如果没有私服,这里不用配置 -->
</profile>

5、IDEA配置

整合Maven进来

6、修改Banner

${AnsiColor.BLUE}
 _______  _______  ______  
|       ||       ||      | 
|____   ||    ___||  _    |
 ____|  ||   |___ | | |   |
| ______||    ___|| |_|   |
| |_____ |   |___ |       |
|_______||_______||______| 

-----版本号-----${spring-boot.version}

> 文字Banner可以从这个网站生成(有很多种字体样式可以选择) 
>
> http://patorjk.com/software/taag
>
> ${AnsiColor.BLUE}        表示Banner文字的颜色
>
> ${spring-boot.version}    当前使用的SpringBoot版本
${AnsiColor.BLUE}
            ___   _____          _
     /\    |__ \ |  __ \        | |
    /  \      ) || |  | |  __ _ | |_  __ _
   / /\ \    / / | |  | | / _` || __|/ _` |
  / ____ \  / /_ | |__| || (_| || |_| (_| |
 /_/    \_\|____||_____/  \__,_| \__|\__,_|
   _____                      _
  / ____|                    (_)
 | (___   _ __    __ _  _ __  _  _ __    __ _
  \___ \ | '_ \  / _` || '__|| || '_ \  / _` |
  ____) || |_) || (_| || |   | || | | || (_| |
 |_____/ | .__/  \__,_||_|   |_||_| |_| \__, |
         | |                             __/ |
         |_|                            |___/



-----版本号-----${spring-boot.version}
本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2019-11-07,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 DataScience 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1、Spring Boot 简介
  • 2、微服务
  • 3、环境准备
  • 4、Maven配置
  • 5、IDEA配置
  • 6、修改Banner
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档