boot

Why is the root filesystem is loaded into a ramdisk?

筅森魡賤 提交于 2019-12-09 13:23:04
问题 I am studying the boot process in Linux. I came across this sentence "RAM is several orders of magnitude faster than a floppy disk, so system operation is fast from a ramdisk" The kernel will anyway load the root filesystem in RAM for executing it. So my question why do we need a ramdisk for loading the the root filesystem, if the kernel loads the root file system into RAM ? 回答1: The documentation for SUSE Linux provides a good explanation of why Linux is booted with a RAMDisk: As soon as the

How can I run a command at boot?

余生长醉 提交于 2019-12-09 11:51:21
问题 I'm trying to figure out how to run a command at boot, like I would type it into the console. I'm using Rasbian with my Raspberry Pi, but I think this question is the same for Debian in general. The command I'm trying to run is: sudo screen mono server.exe I tried the following solution, but since I just started with Linux, I'm not sure if this is correct. #! /bin/sh # /etc/init.d/server ### BEGIN INIT INFO # Provides: server # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs

Consider defining a bean of type 'com.lvjing.dao.DeviceStatusMapper' in your configuration.

二次信任 提交于 2019-12-09 10:23:42
"C:\Program Files\Java\jdk1.8.0_181\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.2.4\lib\idea_rt.jar=55273:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.2.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_181\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext

spring boot 系列之六:深入理解spring boot的自动配置

99封情书 提交于 2019-12-09 10:19:22
我们知道,spring boot自动配置功能可以根据不同情况来决定spring配置应该用哪个,不应该用哪个,举个例子: Spring的JdbcTemplate是不是在Classpath里面?如果是,并且DataSource也存在,就自动配置一个JdbcTemplate的Bean Thymeleaf是不是在Classpath里面?如果是,则自动配置Thymeleaf的模板解析器、视图解析器、模板引擎 那个这个是怎么实现的呢?原因就在于它利用了Spring的条件化配置,条件化配置允许配置存在于应用中,但是在满足某些特定条件前会忽略这些配置。 要实现条件化配置我们要用到@Conditional条件化注解。 本篇随便讲从如下三个方面进行展开: @Conditional小例子,来说明条件化配置的实现方式 spring boot 的条件化配置详解 spring boot 自动配置源码分析 自己动手实现spring boot starter pom 一、@Conditional小例子 我们知道在windows下显示列表的命令是dir,而在linux系统下显示列表的命令是ls,基于条件配置,我们可以实现在不同的操作系统下返回不同的值。 判断条件定义 )windows下的判定条件 /** * 实现spring 的Condition接口,并且重写matches()方法

Android IntentService won't start on boot

◇◆丶佛笑我妖孽 提交于 2019-12-09 07:20:11
问题 I have an IntentService which starts on boot and stays running in the background. There is no launcher Activity, the IntentService is called by a broadcast receiver. It works on 2.3.4 and 4.0.4 devices but not on 4.2.2. Maybe my broadcast receiver isn't being triggered on the device? Manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="br.com.xxx" android:versionCode="1" android:versionName="1.0"> <uses-sdk android

使用 Docker 部署 Springboot 应用

我怕爱的太早我们不能终老 提交于 2019-12-09 00:23:56
在 SpringBoot 实战 之 优雅终止服务 中已经介绍了几种Springboot 应用的部署方式,今天来介绍一种新的部署方式,让应用部署更加简单高效。 对于微服务架构来说,服务拆分的越多,运维的成本也就越高,以前的一个系统只需要部署一次就可以了,但拆分成多个服务后,就需要多次部署了,为了简化部署流程,容器化成了该问题的最佳解决方案。 这里假定大家对 Springboot 应用的搭建及 Docker 都有了一定的了解,如果不知道,可以阅读下 SpringBoot实战 之 入门篇 等系列文章及查看 Docker 官方文档 。 第一步:使用 http://start.spring.io 快速创建一个 gradle 管理的 springboot 工程 生成完以后,需要将 build.gradle 脚本中的版本号改成 1.5.8,如下: buildscript { ext { springBootVersion = '1.5.8.RELEASE' } repositories { mavenCentral() } dependencies { classpath( "org.springframework.boot:spring-boot-gradle-plugin: ${springBootVersion} " ) } } apply plugin: 'java' apply

使用 Docker 部署 Spring Boot

巧了我就是萌 提交于 2019-12-09 00:19:40
Docker 技术发展为微服务落地提供了更加便利的环境,使用 Docker 部署 Spring Boot 其实非常简单,这篇文章我们就来简单学习下。 首先构建一个简单的 Spring Boot 项目,然后给项目添加 Docker 支持,最后对项目进行部署。 一个简单 Spring Boot 项目 在 pom.xml 中 ,使用 Spring Boot 2.0 相关依赖 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.0.RELEASE</version> </parent> 添加 web 和测试依赖 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test

Spring Boot项目打包成docker镜像

元气小坏坏 提交于 2019-12-09 00:09:05
如何完成这篇教程 像大多数的Spring系列教程 Getting Started guides ,你可以从头开始,完成每一步,也可以跳过已经熟悉的基本構建步骤。 无论哪种方式,你都可以成功。 使用maven构建 首先你得安装构建脚本. 你可以使用你喜欢的构建系统去构建Spring应用,你可以前往 Maven官网 来指导你安装。 如果你对 Maven 不熟悉,请参阅 使用Maven构建Java项目 . 创建目录结构 在你当前项目工作目录中,创建如下子目录: 1 2 3 4 └── src └── main └── java └── 应用包名 如在Linux系统下使用 mkdir -p src/main/java/ 应用包名 来创建。 pom.xml <? xml version = "1.0" encoding = "UTF-8" ?> < project xmlns = " http://maven.apache.org/POM/4.0.0" ; xmlns:xsi = " http://www.w3.org/2001/XMLSchema-instance" ; xsi:schemaLocation = " http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" ; > <

第一个 spring Boot 应用通过Docker 来实现构建、运行、发布

末鹿安然 提交于 2019-12-08 23:16:11
1. Docker 简介 Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。容器是完全使用沙箱机制,相互之间不会有任何接口。Docker image 是用于运行容器化进程的方案,在本文中,我们将构建一个简单的 Spring Boot 应用程序。 2.环境搭建 JDK 1.8+ Maven 3.0+ Docker 最新版。 3.用 Maven 构建项目 3.1 创建目录结构 mkdir -p src/main/java/com/lidong/demo 在linux或者mac系统中。 3.2 创建 pom.xml 文件 <?xml version="1.0" encoding="UTF-8"?> < project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > < modelVersion > 4.0.0 </

No bootloader found on bootable medium

巧了我就是萌 提交于 2019-12-08 22:14:27
I'm currently playing with mkisofs, dd and assembly. I've created simple bootloader: BITS 16 ;------------------- ;SIMPLE BOOTLOADER ;------------------- start: mov ax, 0x07C0 mov ds, ax mov si, welcmsg call printstr mov ah, 0Eh mov al, 65 int 10h cli; hlt; printstr: pusha mov ah, 0Eh .loop: mov al, byte [ds:si] cmp al, 0 jz .end int 10h inc si jmp .loop .end: popa ret ;------------------- ;DATA ;------------------- welcmsg: db "Welcome!", 0x0D, 0x0A, 0 ;------------------- ;FILL ;------------------- times 510-($-$$) db 0 dw 0xAA55 I've compiled it on linux using NASM. After successful