一、环境

1.1、Idea 2020.1

1.2、JDK 1.8

二、目的

学习Spring Boot Banner自定义的操作
 

三、步骤

3.1、点击File -> New Project -> Spring Initializer,点击next

3.2、在对应地方修改自己的项目信息

 

3.3、选择Web依赖,选中Spring Web。可以选择Spring Boot版本,本次默认为2.2.6,点击Next

3.4、编辑工程名和项目路径,确定后点击Finish完成

3.5、项目结构

四、自定义Spring Boot Banner

4.1、方式一:默认配置

在resources资源包下新建banner.txt,输入自定义内容。
.__           .__  .__                               .__       .___
| |__ ____ | | | | ____ __ _ _____________| | __| _/
| | _/ __ | | | | / _ / / / _ _ __ | / __ |
| Y ___/| |_| |_( <_> ) ( <_> ) | / |__/ /_/ |
|___| /___ >____/____/____/ /_/ ____/|__| |____/____ |
/ / / spring-boot.version : ${spring-boot.version}
spring-boot.formatted-version :${spring-boot.formatted-version}
启动程序后查看console输出
"C:Program FilesJavajdk1.8.0_221binjava.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:D:ProgramsJetBrainsIntelliJ IDEAlibidea_rt.jar=3016:D:ProgramsJetBrainsIntelliJ IDEAbin" -Dfile.encoding=UTF-8 -classpath "C:Program FilesJavajdk1.8.0_221jrelibcharsets.jar;C:Program FilesJavajdk1.8.0_221jrelibdeploy.jar;C:Program FilesJavajdk1.8.0_221jrelibextaccess-bridge-64.jar;C:Program FilesJavajdk1.8.0_221jrelibextcldrdata.jar;C:Program FilesJavajdk1.8.0_221jrelibextdnsns.jar;C:Program FilesJavajdk1.8.0_221jrelibextjaccess.jar;C:Program FilesJavajdk1.8.0_221jrelibextjfxrt.jar;C:Program FilesJavajdk1.8.0_221jrelibextlocaledata.jar;C:Program FilesJavajdk1.8.0_221jrelibextnashorn.jar;C:Program FilesJavajdk1.8.0_221jrelibextsunec.jar;C:Program FilesJavajdk1.8.0_221jrelibextsunjce_provider.jar;C:Program FilesJavajdk1.8.0_221jrelibextsunmscapi.jar;C:Program FilesJavajdk1.8.0_221jrelibextsunpkcs11.jar;C:Program FilesJavajdk1.8.0_221jrelibextzipfs.jar;C:Program FilesJavajdk1.8.0_221jrelibjavaws.jar;C:Program FilesJavajdk1.8.0_221jrelibjce.jar;C:Program FilesJavajdk1.8.0_221jrelibjfr.jar;C:Program FilesJavajdk1.8.0_221jrelibjfxswt.jar;C:Program FilesJavajdk1.8.0_221jrelibjsse.jar;C:Program FilesJavajdk1.8.0_221jrelibmanagement-agent.jar;C:Program FilesJavajdk1.8.0_221jrelibplugin.jar;C:Program FilesJavajdk1.8.0_221jrelibresources.jar;C:Program FilesJavajdk1.8.0_221jrelibrt.jar;D:WorkSpaceIdeaouyushanouyushan-spring-boot-samplesspring-boot-bannertargetclasses;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot-starter-web2.2.6.RELEASEspring-boot-starter-web-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot-starter2.2.6.RELEASEspring-boot-starter-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot2.2.6.RELEASEspring-boot-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot-autoconfigure2.2.6.RELEASEspring-boot-autoconfigure-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot-starter-logging2.2.6.RELEASEspring-boot-starter-logging-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositorychqoslogbacklogback-classic1.2.3logback-classic-1.2.3.jar;D:Programsapachemavenapache-maven-repositorychqoslogbacklogback-core1.2.3logback-core-1.2.3.jar;D:Programsapachemavenapache-maven-repositoryorgapachelogginglog4jlog4j-to-slf4j2.12.1log4j-to-slf4j-2.12.1.jar;D:Programsapachemavenapache-maven-repositoryorgapachelogginglog4jlog4j-api2.12.1log4j-api-2.12.1.jar;D:Programsapachemavenapache-maven-repositoryorgslf4jjul-to-slf4j1.7.30jul-to-slf4j-1.7.30.jar;D:Programsapachemavenapache-maven-repositoryjakartaannotationjakarta.annotation-api1.3.5jakarta.annotation-api-1.3.5.jar;D:Programsapachemavenapache-maven-repositoryorgyamlsnakeyaml1.25snakeyaml-1.25.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot-starter-json2.2.6.RELEASEspring-boot-starter-json-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositorycomfasterxmljacksoncorejackson-databind2.10.3jackson-databind-2.10.3.jar;D:Programsapachemavenapache-maven-repositorycomfasterxmljacksoncorejackson-annotations2.10.3jackson-annotations-2.10.3.jar;D:Programsapachemavenapache-maven-repositorycomfasterxmljacksoncorejackson-core2.10.3jackson-core-2.10.3.jar;D:Programsapachemavenapache-maven-repositorycomfasterxmljacksondatatypejackson-datatype-jdk82.10.3jackson-datatype-jdk8-2.10.3.jar;D:Programsapachemavenapache-maven-repositorycomfasterxmljacksondatatypejackson-datatype-jsr3102.10.3jackson-datatype-jsr310-2.10.3.jar;D:Programsapachemavenapache-maven-repositorycomfasterxmljacksonmodulejackson-module-parameter-names2.10.3jackson-module-parameter-names-2.10.3.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot-starter-tomcat2.2.6.RELEASEspring-boot-starter-tomcat-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgapachetomcatembedtomcat-embed-core9.0.33tomcat-embed-core-9.0.33.jar;D:Programsapachemavenapache-maven-repositoryorgapachetomcatembedtomcat-embed-el9.0.33tomcat-embed-el-9.0.33.jar;D:Programsapachemavenapache-maven-repositoryorgapachetomcatembedtomcat-embed-websocket9.0.33tomcat-embed-websocket-9.0.33.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot-starter-validation2.2.6.RELEASEspring-boot-starter-validation-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryjakartavalidationjakarta.validation-api2.0.2jakarta.validation-api-2.0.2.jar;D:Programsapachemavenapache-maven-repositoryorghibernatevalidatorhibernate-validator6.0.18.Finalhibernate-validator-6.0.18.Final.jar;D:Programsapachemavenapache-maven-repositoryorgjbossloggingjboss-logging3.4.1.Finaljboss-logging-3.4.1.Final.jar;D:Programsapachemavenapache-maven-repositorycomfasterxmlclassmate1.5.1classmate-1.5.1.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-web5.2.5.RELEASEspring-web-5.2.5.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-beans5.2.5.RELEASEspring-beans-5.2.5.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-webmvc5.2.5.RELEASEspring-webmvc-5.2.5.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-aop5.2.5.RELEASEspring-aop-5.2.5.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-context5.2.5.RELEASEspring-context-5.2.5.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-expression5.2.5.RELEASEspring-expression-5.2.5.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgslf4jslf4j-api1.7.30slf4j-api-1.7.30.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-core5.2.5.RELEASEspring-core-5.2.5.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-jcl5.2.5.RELEASEspring-jcl-5.2.5.RELEASE.jar" org.ouyushan.springboot.banner.SpringBootBannerApplication
.__ .__ .__ .__ .___
| |__ ____ | | | | ____ __ _ _____________| | __| _/
| | _/ __ | | | | / _ / / / _ _ __ | / __ |
| Y ___/| |_| |_( <_> ) ( <_> ) | / |__/ /_/ |
|___| /___ >____/____/____/ /_/ ____/|__| |____/____ |
/ / / spring-boot.version : 2.2.6.RELEASE
spring-boot.formatted-version : (v2.2.6.RELEASE) 2020-04-27 10:37:31.150 INFO 8696 --- [ main] o.o.s.b.SpringBootBannerApplication : Starting SpringBootBannerApplication

4.2、方式二:自定义文本banner配置

在application.properties配置文件中指定
## 指定文本文件位置 spring.banner.location=/txt/banner.txt 
在resourcesz资源包中新建/txt/banner.txt文件,配置内容
.__           .__  .__                               .__       .___
| |__ ____ | | | | ____ __ _ _____________| | __| _/
| | _/ __ | | | | / _ / / / _ _ __ | / __ |
| Y ___/| |_| |_( <_> ) ( <_> ) | / |__/ /_/ |
|___| /___ >____/____/____/ /_/ ____/|__| |____/____ |
/ / / 指定banner位置:resource/txt
spring-boot.version : ${spring-boot.version}
spring-boot.formatted-version :${spring-boot.formatted-version}
启动项目后,console输出如下,此时自定义/txt/banner.txt会覆盖banner.txt
"C:Program FilesJavajdk1.8.0_221binjava.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:3230,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:C:UsersyangyanglleiAppDataLocalJetBrainsIntelliJIdea2020.1captureAgentdebugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:Program FilesJavajdk1.8.0_221jrelibcharsets.jar;C:Program FilesJavajdk1.8.0_221jrelibdeploy.jar;C:Program FilesJavajdk1.8.0_221jrelibextaccess-bridge-64.jar;C:Program FilesJavajdk1.8.0_221jrelibextcldrdata.jar;C:Program FilesJavajdk1.8.0_221jrelibextdnsns.jar;C:Program FilesJavajdk1.8.0_221jrelibextjaccess.jar;C:Program FilesJavajdk1.8.0_221jrelibextjfxrt.jar;C:Program FilesJavajdk1.8.0_221jrelibextlocaledata.jar;C:Program FilesJavajdk1.8.0_221jrelibextnashorn.jar;C:Program FilesJavajdk1.8.0_221jrelibextsunec.jar;C:Program FilesJavajdk1.8.0_221jrelibextsunjce_provider.jar;C:Program FilesJavajdk1.8.0_221jrelibextsunmscapi.jar;C:Program FilesJavajdk1.8.0_221jrelibextsunpkcs11.jar;C:Program FilesJavajdk1.8.0_221jrelibextzipfs.jar;C:Program FilesJavajdk1.8.0_221jrelibjavaws.jar;C:Program FilesJavajdk1.8.0_221jrelibjce.jar;C:Program FilesJavajdk1.8.0_221jrelibjfr.jar;C:Program FilesJavajdk1.8.0_221jrelibjfxswt.jar;C:Program FilesJavajdk1.8.0_221jrelibjsse.jar;C:Program FilesJavajdk1.8.0_221jrelibmanagement-agent.jar;C:Program FilesJavajdk1.8.0_221jrelibplugin.jar;C:Program FilesJavajdk1.8.0_221jrelibresources.jar;C:Program FilesJavajdk1.8.0_221jrelibrt.jar;D:WorkSpaceIdeaouyushanouyushan-spring-boot-samplesspring-boot-bannertargetclasses;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot-starter-web2.2.6.RELEASEspring-boot-starter-web-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot-starter2.2.6.RELEASEspring-boot-starter-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot2.2.6.RELEASEspring-boot-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot-autoconfigure2.2.6.RELEASEspring-boot-autoconfigure-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot-starter-logging2.2.6.RELEASEspring-boot-starter-logging-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositorychqoslogbacklogback-classic1.2.3logback-classic-1.2.3.jar;D:Programsapachemavenapache-maven-repositorychqoslogbacklogback-core1.2.3logback-core-1.2.3.jar;D:Programsapachemavenapache-maven-repositoryorgapachelogginglog4jlog4j-to-slf4j2.12.1log4j-to-slf4j-2.12.1.jar;D:Programsapachemavenapache-maven-repositoryorgapachelogginglog4jlog4j-api2.12.1log4j-api-2.12.1.jar;D:Programsapachemavenapache-maven-repositoryorgslf4jjul-to-slf4j1.7.30jul-to-slf4j-1.7.30.jar;D:Programsapachemavenapache-maven-repositoryjakartaannotationjakarta.annotation-api1.3.5jakarta.annotation-api-1.3.5.jar;D:Programsapachemavenapache-maven-repositoryorgyamlsnakeyaml1.25snakeyaml-1.25.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot-starter-json2.2.6.RELEASEspring-boot-starter-json-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositorycomfasterxmljacksoncorejackson-databind2.10.3jackson-databind-2.10.3.jar;D:Programsapachemavenapache-maven-repositorycomfasterxmljacksoncorejackson-annotations2.10.3jackson-annotations-2.10.3.jar;D:Programsapachemavenapache-maven-repositorycomfasterxmljacksoncorejackson-core2.10.3jackson-core-2.10.3.jar;D:Programsapachemavenapache-maven-repositorycomfasterxmljacksondatatypejackson-datatype-jdk82.10.3jackson-datatype-jdk8-2.10.3.jar;D:Programsapachemavenapache-maven-repositorycomfasterxmljacksondatatypejackson-datatype-jsr3102.10.3jackson-datatype-jsr310-2.10.3.jar;D:Programsapachemavenapache-maven-repositorycomfasterxmljacksonmodulejackson-module-parameter-names2.10.3jackson-module-parameter-names-2.10.3.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot-starter-tomcat2.2.6.RELEASEspring-boot-starter-tomcat-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgapachetomcatembedtomcat-embed-core9.0.33tomcat-embed-core-9.0.33.jar;D:Programsapachemavenapache-maven-repositoryorgapachetomcatembedtomcat-embed-el9.0.33tomcat-embed-el-9.0.33.jar;D:Programsapachemavenapache-maven-repositoryorgapachetomcatembedtomcat-embed-websocket9.0.33tomcat-embed-websocket-9.0.33.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkbootspring-boot-starter-validation2.2.6.RELEASEspring-boot-starter-validation-2.2.6.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryjakartavalidationjakarta.validation-api2.0.2jakarta.validation-api-2.0.2.jar;D:Programsapachemavenapache-maven-repositoryorghibernatevalidatorhibernate-validator6.0.18.Finalhibernate-validator-6.0.18.Final.jar;D:Programsapachemavenapache-maven-repositoryorgjbossloggingjboss-logging3.4.1.Finaljboss-logging-3.4.1.Final.jar;D:Programsapachemavenapache-maven-repositorycomfasterxmlclassmate1.5.1classmate-1.5.1.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-web5.2.5.RELEASEspring-web-5.2.5.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-beans5.2.5.RELEASEspring-beans-5.2.5.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-webmvc5.2.5.RELEASEspring-webmvc-5.2.5.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-aop5.2.5.RELEASEspring-aop-5.2.5.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-context5.2.5.RELEASEspring-context-5.2.5.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-expression5.2.5.RELEASEspring-expression-5.2.5.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgslf4jslf4j-api1.7.30slf4j-api-1.7.30.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-core5.2.5.RELEASEspring-core-5.2.5.RELEASE.jar;D:Programsapachemavenapache-maven-repositoryorgspringframeworkspring-jcl5.2.5.RELEASEspring-jcl-5.2.5.RELEASE.jar;D:ProgramsJetBrainsIntelliJ IDEAlibidea_rt.jar" org.ouyushan.springboot.banner.SpringBootBannerApplication
Connected to the target VM, address: '127.0.0.1:3230', transport: 'socket'
.__ .__ .__ .__ .___
| |__ ____ | | | | ____ __ _ _____________| | __| _/
| | _/ __ | | | | / _ / / / _ _ __ | / __ |
| Y ___/| |_| |_( <_> ) ( <_> ) | / |__/ /_/ |
|___| /___ >____/____/____/ /_/ ____/|__| |____/____ |
/ / / 指定banner位置:resource/txt
spring-boot.version : 2.2.6.RELEASE
spring-boot.formatted-version : (v2.2.6.RELEASE)

4.3、方式三:自定义图片banner配置

在application.properties配置文件中指定

## 指定文本文件位置
# spring.banner.location=/txt/banner.txt ## 指定图片文件位置
spring.banner.image.location=/image/banner.gif
 
在resourcese资源包中新建/image,将下图命名为banner.gif后存入image目录
启动项目后,console会逐贞输出gif图片

五、知识点

## 1、项目名称:
```
spring-boot-banner
```
## 2、相关概念:
* spring boot banner 可以是文本也可以是动画,同时存在时动画优先于文本显示。
* spring boot 启动时会默认从classpath中加载banner.txt,若存在则打印里面的内容。
* banner.txt中可包含以下等变量:
```
${application.version}
${application.formatted-version}
${spring-boot.version}
${spring-boot.formatted-version}
${application.title}
``` * 通过以下配置来指定banner文本文件的位置,默认在根目录下,如resources ```
spring.banner.location=/txt/banner.txt
``` * 通过以下配置来指定banner文本文件的编码,默认UTF-8
```
spring.banner.charset
``` * 支持的图片文件为banner.gif、banner.jpg和banner.png。图片文件会被转换为ASCII art,并优先于文本banner展示。
* 通过以下配置来指定banner图像文件的位置,默认在根目录下,如resources
```
spring.banner.image.location=/image/banner.gif
``` * 通过以下配置来指定banner状态和级别,不配置时默认开启console
```
# spring.main.banner-mode=console
# spring.main.banner-mode=log
## 关闭banner
# spring.main.banner-mode=off
``` ## 3、sample实现
* 文本banner
在resources下新建文件banner.txt
```
.__ .__ .__ .__ .___
| |__ ____ | | | | ____ __ _ _____________| | __| _/
| | _/ __ | | | | / _ / / / _ _ __ | / __ |
| Y ___/| |_| |_( <_> ) ( <_> ) | / |__/ /_/ |
|___| /___ >____/____/____/ /_/ ____/|__| |____/____ |
/ / / spring-boot.version : ${spring-boot.version}
spring-boot.formatted-version :${spring-boot.formatted-version}
```
打印信息
``` .__ .__ .__ .__ .___
| |__ ____ | | | | ____ __ _ _____________| | __| _/
| | _/ __ | | | | / _ / / / _ _ __ | / __ |
| Y ___/| |_| |_( <_> ) ( <_> ) | / |__/ /_/ |
|___| /___ >____/____/____/ /_/ ____/|__| |____/____ |
/ / / spring-boot.version : 2.2.6.RELEASE
spring-boot.formatted-version : (v2.2.6.RELEASE)
``` * 图片banner
在resources下保存spring官方banner.gif

Spring boot Sample 002之spring-boot-banner的更多相关文章

  1. Spring Boot 2 (二):Spring Boot 2 动态 Banner

    Spring Boot 2 (二):Spring Boot 2 动态 Banner Spring Boot 2.0 提供了很多新特性,其中就有一个小彩蛋:动态 Banner. 一.配置依赖 使用 Sp ...

  2. Spring boot Sample 012之spring-boot-web-upload

    一.环境 1.1.Idea 2020.1 1.2.JDK 1.8 二.目的 spring boot 整合web实现文件上传下载 三.步骤 3.1.点击File -> New Project -& ...

  3. Spring boot Sample 0010之spring-boot-web-freemarker

    一.环境 1.1.Idea 2020.1 1.2.JDK 1.8 二.目的 spring boot 整合freemarker模板开发web项目 三.步骤 3.1.点击File -> New Pr ...

  4. Spring boot Sample 009之spring-boot-web-thymeleaf

    一.环境 1.1.Idea 2020.1 1.2.JDK 1.8 二.目的 spring boot 整合thymeleaf模板开发web项目 三.步骤 3.1.点击File -> New Pro ...

  5. Spring boot Sample 006之spring-boot-custom-servlet

    一.环境 1.1.Idea 2020.1 1.2.JDK 1.8 二.步骤 2.1.点击File -> New Project -> Spring Initializer,点击next 2 ...

  6. Spring boot Sample 005之spring-boot-profile

    一.环境 1.1.Idea 2020.1 1.2.JDK 1.8 二.目的 通过yaml文件配置spring boot 属性文件 三.步骤 3.1.点击File -> New Project - ...

  7. Spring Boot (五)Spring Data JPA 操作 MySQL 8

    一.Spring Data JPA 介绍 JPA(Java Persistence API)Java持久化API,是 Java 持久化的标准规范,Hibernate是持久化规范的技术实现,而Sprin ...

  8. 一起学JAVA之《spring boot》03 - 开始spring boot基本配置及项目结构(转)

    <div class="markdown_views"> <h3 id="一导航"><a name="t0"& ...

  9. Spring 5.x 、Spring Boot 2.x 、Spring Cloud 与常用技术栈整合

    项目 GitHub 地址:https://github.com/heibaiying/spring-samples-for-all 版本说明: Spring: 5.1.3.RELEASE Spring ...

随机推荐

  1. JAVA基础篇 之 方法的重载

    ​ 任何程序语言都具备了一项重要的特性就是对名字的运用.当创建一个对象时,也就给此对象分配到的存储空间取了一个名字.所谓方法则是给某个动作取的名字.通过使用名字你可以引用所有的对象和方法. ​ 将人类 ...

  2. Alink漫谈(二) : 从源码看机器学习平台Alink设计和架构

    Alink漫谈(二) : 从源码看机器学习平台Alink设计和架构 目录 Alink漫谈(二) : 从源码看机器学习平台Alink设计和架构 0x00 摘要 0x01 Alink设计原则 0x02 A ...

  3. 【Hadoop离线基础总结】关键路径转化率分析(漏斗模型)

    关键路径转化 需求 在一条指定的业务流程中,各个步骤的完成人数及相对上一个步骤的百分比 模型设计 定义好业务流程中的页面标识 Step1. /item Step2. /category Step3. ...

  4. JAVA知识总结(四):单例模式和多态

    好吧,今天一定要把面向对象的最后一个特性:多态,给说完.不过我们先来聊一聊设计模式,因为它很重要. 设计模式 官方的解释是,设计模式是:一套被反复使用,多数人知晓的,经过分类编目,代码设计经验的总结. ...

  5. 【漫画】JAVA并发编程 如何解决原子性问题

    原创声明:本文转载自公众号[胖滚猪学编程],转载务必注明出处! 在并发编程BUG源头文章中,我们初识了并发编程的三个bug源头:可见性.原子性.有序性.在如何解决可见性和原子性文章中我们大致了解了可见 ...

  6. YOLOV4所用到的一些tricks

    原文链接:http://arxiv.org/abs/2004.10934 整体框架        Bag of Freebies(BoF) & Bag  of Specials (BoS) B ...

  7. C#实现前向最大匹、字典树(分词、检索)

    场景:现在有一个错词库,维护的是错词和正确词对应关系.比如:错词“我门”对应的正确词“我们”.然后在用户输入的文字进行错词校验,需要判断输入的文字是否有错词,并找出错词以便提醒用户,并且可以显示出正确 ...

  8. 使用 PyCharm 添加 Django 项目

    一.前置准备(PyCharm与Python的下载,已有的跳过) 1.首先下载PyCharm 地址:http://www.jetbrains.com/pycharm/ 2.然后下载Python 地址:h ...

  9. markdonwn 测试1

    标题测试 ## 二级标题 ### 三级标题 二级标题 三级标题 段落格式 换行 末尾两个空格 第一行第一行第一行第一行第一行第一行第一行第一行 第二行第二行第二行第二行第二行第二行第二行第二行 第一行 ...

  10. Hadoop 集群搭建和维护文档

    一.前言 -- 基础环境准备 节点名称 IP NN DN JNN ZKFC ZK RM NM Master Worker master1 192.168.8.106 * * * * * * maste ...