boot

springboot项目发布到linux服务器上(使用自己的tomcat)

痞子三分冷 提交于 2019-12-04 15:13:27
1、在 pom.xml 中导入依赖来阻止springvoot内置的tomcat <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency> 2、修改服务器启动类使其继承 SpringBootServletInitializer 类并重写其 configure 方法 package com.woniuxy.app; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import

Google Compute Engine VM instance: VFS: Unable to mount root fs on unknown-block

允我心安 提交于 2019-12-04 14:23:48
My instance on Google Compute Engine is not booting up due to having some boot order issues. So, I have created a another instance and re-configured my machine. My questions: How can I handle these issues when I host some websites? How can I recover my data from old disk? logs [ 0.348577] Key type trusted registered [ 0.349232] Key type encrypted registered [ 0.349769] AppArmor: AppArmor sha1 policy hashing enabled [ 0.350351] ima: No TPM chip found, activating TPM-bypass! [ 0.351070] evm: HMAC attrs: 0x1 [ 0.351549] Magic number: 11:333:138 [ 0.352077] block ram3: hash matches [ 0.352550] rtc

安装Win10+Ubuntu踩过的坑(Ubuntu 18.04.1 LTS)

与世无争的帅哥 提交于 2019-12-04 13:36:49
强调 1. 版本:Ubuntu 18.04.1 LTS 2. 笔记本:宏碁4752G 3. 此方法适用于我自己,仅供参考 一、前言 这台笔记本是12年买的,intel 2代处理器,内存条4G 双通道,加了固态但仅分了一个盘作为系统盘,由于不想把 Ubuntu和Win10放在一起,本次安装选择在机械硬盘中。 本人之前仅在台式机上装过linux虚拟机,这台笔记本由于配置较低,不适合装虚拟机,所以选择安装双系统。安装之前在网上也寻找了很多教程,由于一些教程不详细或者不适用,安装过程异常坎坷,故写出来为大家提供下经验。 二、操作过程 首次安装参考了这三种的安装方法 https://blog.csdn.net/flyyufenfei/article/details/79187656 https://www.jianshu.com/p/16b36b912b02 https://blog.csdn.net/jesse_mx/article/details/61425361 1. 分区 利用Windows 10中打开“磁盘管理器”,我这里是利用DiskGenius将D盘格式化充当系统盘给Ubuntu使用,对安装没影响,空间大概40GB。 2.制作Ubuntu启动盘 选择使用了UltraISO制作了系统启动盘 关闭了 快速启动(FastBoot) ,我的电脑没有 安全启动(secure boot)

Android : Turn on a device programmatically

*爱你&永不变心* 提交于 2019-12-04 11:26:05
问题 I have a smartphone connected to a solar charger. By day, it is powered correctly. But during the night, sometimes it turns itself off due to the lack of energy. My question is : It is possible to turn it back on (programmatically), when the battery charge exceeds a certain percentage? I'm looking for a clean and legal way. I'm not interested in flaws or exploits. I found nothing in the official documentation. Thank you. 回答1: The mechanism for doing this relies on replacing the battery

Why 55 AA is used as the boot signature on IBM PCs? [closed]

扶醉桌前 提交于 2019-12-04 11:15:01
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Why does the IBM PC architecture use 55 AA magic numbers in the last two bytes of a bootsector for the boot signature ? I suspect that has something to do with the bit patterns they are: 01010101 10101010 , but don't know what. My guesses are that: BIOS is making some bitwise and/or/xor operations on these bytes

SpringBoot 源码解析 (一)----- SpringBoot核心原理入门

删除回忆录丶 提交于 2019-12-04 10:39:29
Spring Boot 概述 Build Anything with Spring Boot: Spring Boot is the starting point for building all Spring-based applications. Spring Boot is designed to get you up and running as quickly as possible, with minimal upfront configuration of Spring. 上面是引自官网的一段话,大概是说: Spring Boot 是所有基于 Spring 开发的项目的起点。Spring Boot 的设计是为了让你尽可能快的跑起来 Spring 应用程序并且尽可能减少你的配置文件。 什么是 Spring Boot 它使用 “习惯优于配置” (项目中存在大量的配置,此外还内置一个习惯性的配置,让你无须手动配置)的理念让你的项目快速运行起来。 它并不是什么新的框架,而是默认配置了很多框架的使用方式,就像 Maven 整合了所有的 jar 包一样,Spring Boot 整合了所有框架 使用 Spring Boot 有什么好处 回顾我们之前的 SSM 项目,搭建过程还是比较繁琐的,需要: 1)配置 web.xml,加载 spring 和 spring mvc 2

Develop a Bootloader In Assembly

放肆的年华 提交于 2019-12-04 09:30:21
I've already done a part of my OS in Assembly, but now I want to build a own bootloader for it too instead of using GRUB. When I was developing my test OS in Assembly I remember that I boot it like this: org 0x7c00 bits 16 ; OS Kernel Here times 510 - ($-$$) db 0 dw 0xAA55 This I've already know. Now I want to use this and execute the "real" OS that will be a *.bin file written to the 2nd sector of the floppy. Then I want to know somethings How can I do a bootloader in Assembly to execute what will be starting on the 2nd sector of the floppy? I need to add anything to the Assembly source that

Spring Boot启动流程分析

北慕城南 提交于 2019-12-04 08:29:29
引言 早在15年的时候就开始用spring boot进行开发了,然而一直就只是用用,并没有深入去了解spring boot是以什么原理怎样工作的,说来也惭愧。今天让我们从spring boot启动开始,深入了解一下spring boot的工作原理。 为什么用spring boot 在使用一个东西或者一个工具之前,我们总是会问自己,我为什么要用?用他能给我带来什么好处? * 最大的好处就是spring boot遵从了java**约定大于配置**不用面对一大堆的配置文件,spring boot是根据你用的包来决定提供什么配置。 * 服务器以jar包的形式内嵌于项目中,对于微服务满天飞的情况,spring boot天生适合微服务架构,方便部署。 * 提供devtools从此改代码就需重启成为历史。 有优点就一定有缺点,缺点来源于优点优点来源于缺点(感觉在说哲学问题了哈哈哈) * 正因为配置对开发者不透明,不看源码会不清楚spring boot如何进行诸如JDBC加载、事务管理等,出现错误也很难调错。 * 自动配置之后要自定义配置需编码javaConfig,需要了解这些配置类api。 * 版本迭代太快,新版本对老版本改动太多导致不兼容,比如1.3.5之前的springBootTest和1.4.0之后的springBootTest。 只有合适的架构才是最好的架构如果能接受spring

Spring Boot中快速操作Mongodb

房东的猫 提交于 2019-12-04 07:55:30
Spring Boot中快速操作Mongodb 在Spring Boot中集成Mongodb非常简单,只需要加入Mongodb的Starter包即可,代码如下: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb</artifactId> </dependency> 复制代码 然后配置Mongodb的连接信息: spring.data.mongodb.uri=mongodb://192.168.0.13/test 复制代码 完整配置信息请参考下面: spring.data.mongodb.authentication-database= # Authentication database name. spring.data.mongodb.database= # Database name. spring.data.mongodb.field-naming-strategy= # Fully qualified name of the FieldNamingStrategy to use. spring.data.mongodb.grid-fs-database= # GridFS database name. spring