boot

Spring Boot 常用基本配置

一世执手 提交于 2019-12-21 08:53:12
Spring Boot 常用配置 自定义 Banner 在 Spring Boot 启动的时候会有一个默认的启动图案 . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.1.6.RELEASE) 我们在 src/main/resources 目录下新建一个 banner.txt 通过 http://patorjk.com/software/taag 网站生成字符串,将网站生成的字符复制到 banner.txt 中 再次运行这个程序(整个金光佛祖开开光) ${AnsiColor.BRIGHT_YELLOW} //////////////////////////////////////////////////////////////////// // _ooOoo_ // // o8888888o // // 88" . "88 // // (| ^_^ |) // /

Android - How to start an application on the /sdcard after boot

三世轮回 提交于 2019-12-21 06:57:17
问题 Is there a way how to start and android application after a boot automatically if it is on the /sdcard ? Ok, probably by BroadcastReceiver . But which action is the right one? ACTION_BOOT_COMPLETED - does not work if it is on the /sdcard (documented) ACTION_MEDIA_MOUNTED - does not work if it is on the /sdcard (which is undocumented) ACTION_EXTERNAL_APPLICATIONS_AVAILABLE - does not work, I do not know why ACTION_USER_PRESENT - does not work if the BroadcastReceiver is registered in

20 道 Spring Boot 面试题

时光总嘲笑我的痴心妄想 提交于 2019-12-21 03:01:43
转自:微信公众号: Java技术栈(id: javastack) 面试了一些人,简历上都说自己熟悉 Spring Boot, 或者说正在学习 Spring Boot,一问他们时,都只停留在简单的使用阶段,很多东西都不清楚,也让我对面试者大失所望。 下面,我给大家总结下有哪些 Spring Boot 的面试题,这是我经常拿来问面试者的,希望对你有帮助。 1、什么是 Spring Boot? Spring Boot 是 Spring 开源组织下的子项目,是 Spring 组件一站式解决方案,主要是简化了使用 Spring 的难度,简省了繁重的配置,提供了各种启动器,开发者能快速上手。 更多 Spring Boot 详细介绍请看这篇文章《 什么是Spring Boot? 》。 2、为什么要用 Spring Boot? Spring Boot 优点非常多,如: 独立运行 简化配置 自动配置 无代码生成和XML配置 应用监控 上手容易 … Spring Boot 集这么多优点于一身,还有理由不使用它呢? 3、Spring Boot 的核心配置文件有哪几个?它们的区别是什么? Spring Boot 的核心配置文件是 application 和 bootstrap 配置文件。 application 配置文件这个容易理解,主要用于 Spring Boot 项目的自动化配置。 bootstrap

Soft-float version of Raspbian does not boot

亡梦爱人 提交于 2019-12-21 02:51:11
问题 I downloaded the hard float image of Raspbian here: http://www.raspberrypi.org/downloads I copied the recommended hard-float image on an SD card and the Raspberry Pi boots fine with it. Then I downloaded the soft-float version of Raspbian because I need it to get some software running that does not work on the hard-float version. I formatted the SD card again, copied the soft-float image onto it and tried to boot the Raspberry Pi with it. Problem: the Raspbery Pi doesn't boot with the soft

springboot学习笔记(2)

别来无恙 提交于 2019-12-21 02:42:38
properties文件的字符集问题 properties文件默认字符集为ISO-8859-1,不支持中文,这时候就需要更换字符集。STS中,window-》Preference-》General-》content types-》text-》Java properties file,设置默认字符集为utf-8。 读取自定义properties文件属性 首先,写下properties文件属性: person . last - name = 张三 person . age = 18 person . boss = true 然后,写出装载properties文件属性的类,并加上**@ConfigurationProperties(prefix=“person”) 和 @Component 注解。另外,还有 getters and setters**。亲测, 缺一不可 。 最后,给声明装载类并加上**@Autowired**注解。 读取properties文件时@Value与@ConfigurationProperties的比较 @ConfigurationProperties相较之下是一个全局注解,而@Value只能写在属性边上。@ConfigurationProperties支持松散绑定,就是properties文件中写last-name,类中属性写lastName,这样也没事。而

Spring Boot 从1.0 升级到 2.0 所踩的坑

自作多情 提交于 2019-12-21 00:16:44
先给大家晒一下云收藏的几个数据,作为一个 Spring Boot 的开源项目( https://github.com/cloudfavorites/favorites-web )目前在 Github 上面已经有1600多个 Star,如果按照 SpringBoot 标签进行筛选的话也可以排到第五位。 当云收藏1.0开发完成之后,同步将云收藏部署到了服务器上,申请了一个域名 www.favorites.ren 方便大家使用,到目前为止:网站的注册用户4000多人,共计收藏文章100000多条,在百度上搜索:云收藏,排在第一的就是云收藏的官网。2年多的时间这个数据其实也并不是很耀眼,但是作为一个学习 Spring Boot 的开源软件来讲,已经不错了。 云收藏的部署之路也挺曲折,刚开始的时候部署在我以前公司的服务器上,后来离职的时候买了个1核1G的云服务器,因为安装了 Mysql、Redis、还有其它小软件导致服务器非常卡,那段时间访问云收藏的时候需要等待2-3秒才会有响应。 终于有一天自己也不能忍了,花钱把服务器升级到2核2G,访问速度虽有所提升但还是很不理想,那段时间工作很忙也没时间优化。网站的 Bug 也是一片,有时候还会突然中断服务几个小时,流失了一大批用户。 到了今年 Spring Boot 2.0 发布的时候,我就计划着把云收藏全面升级到2.0

20 道 Spring Boot 面试题

女生的网名这么多〃 提交于 2019-12-20 23:53:37
原文鏈接:https://blog.csdn.net/zl1zl2zl3/article/details/83715633 1、什么是 Spring Boot? Spring Boot 是 Spring 开源组织下的子项目,是 Spring 组件一站式解决方案,主要是简化了使用 Spring 的难度,简省了繁重的配置,提供了各种启动器,开发者能快速上手。 更多 Spring Boot 详细介绍请看这篇文章《 什么是Spring Boot? 》。 2、为什么要用 Spring Boot? Spring Boot 优点非常多,如: 独立运行 简化配置 自动配置 无代码生成和XML配置 应用监控 上手容易 … Spring Boot 集这么多优点于一身,还有理由不使用它呢? 3、Spring Boot 的核心配置文件有哪几个?它们的区别是什么? Spring Boot 的核心配置文件是 application 和 bootstrap 配置文件。 application 配置文件这个容易理解,主要用于 Spring Boot 项目的自动化配置。 bootstrap 配置文件有以下几个应用场景。 使用 Spring Cloud Config 配置中心时,这时需要在 bootstrap 配置文件中添加连接到配置中心的配置属性来加载外部配置中心的配置信息; 一些固定的不能被覆盖的属性; 一些加密

Who loads the BIOS and the memory map during boot-up

点点圈 提交于 2019-12-20 23:30:57
问题 For the BIOS, Wikipedia states: The address of the BIOS's memory is located such that it will be executed when the computer is first started up. A jump instruction then directs the processor to start executing code in the BIOS. I know that BIOS lives in non-volatile memory. But it would have to be loaded into the RAM for it to be executed. So who loads the BIOS into RAM ? I have also read that a memory map is loaded at start-up. Does the BIOS load this memory map ? Where is is stored ? 回答1:

Spring Factories | spring.factories | SPI

我是研究僧i 提交于 2019-12-20 20:34:07
该文章转载自: https://blog.csdn.net/lvoyee/article/details/82017057 Spring Boot中有一种非常解耦的扩展机制:Spring Factories。这种扩展机制实际上是仿照Java中的SPI扩展机制来实现的。 什么是 SPI机制 SPI的全名为Service Provider Interface.大多数开发人员可能不熟悉,因为这个是针对厂商或者插件的。在java.util.ServiceLoader的文档里有比较详细的介绍。 简单的总结下java SPI机制的思想。我们系统里抽象的各个模块,往往有很多不同的实现方案,比如日志模块的方案,xml解析模块、jdbc模块的方案等。面向的对象的设计里,我们一般推荐模块之间基于接口编程,模块之间不对实现类进行硬编码。一旦代码里涉及具体的实现类,就违反了可拔插的原则,如果需要替换一种实现,就需要修改代码。为了实现在模块装配的时候能不在程序里动态指明,这就需要一种服务发现机制。 java SPI就是提供这样的一个机制:为某个接口寻找服务实现的机制。有点类似IOC的思想,就是将装配的控制权移到程序之外,在模块化设计中这个机制尤其重要。 Spring Boot中的SPI机制 在Spring中也有一种类似与Java SPI的加载机制。它在META-INF/spring

计算机开机启动过程详解

筅森魡賤 提交于 2019-12-20 16:26:22
http://blog.chinaunix.net/uid-24501667-id-3490922.html 从打开电源到开始操作,计算机的启动是一个非常复杂的过程 。 我一直搞不清楚,这个过程到底是怎么回事,只看见屏幕快速滚动各种提示...... 这几天,我查了一些资料,试图搞懂它 。 下面就是我整理的笔记 。 零、boot的含义 先问一个问题,"启动"用英语怎么说?  回答是boot。可是,boot原来的意思是靴子,"启动"与靴子有什么关系呢? 原来,这里的boot是bootstrap(鞋带)的缩写,它来自一句谚语: "pull oneself up by one's bootstraps" 字面意思是"拽着鞋带把自己拉起来",这当然是不可能的事情。最早的时候,工程师们用它来比喻,计算机启动是一个很矛盾的过程:必须先运行程序,然后计算机才能启动,但是计算机不启动就无法运行程序! 早期真的是这样,必须想尽各种办法,把一小段程序装进内存,然后计算机才能正常运行。所以,工程师们把这个过程叫做"拉鞋带",久而久之就简称为boot了 。   计算机的整个启动过程分成四个阶段。 一 、 第一阶段:BIOS   上个世纪70年代初,"只读内存"(read-only memory,缩写为ROM)发明,开机程序被刷入ROM芯片,计算机通电后,第一件事就是读取它 。 这块芯片里的程序叫做