boot

Detect if HTC “Fast boot” is enabled

孤街醉人 提交于 2019-11-29 10:51:37
Some HTC phones have a feature called Fast boot (can be enabled under Preferences -> Power). As I have understood it this works like hibernation. When started again no BOOT_COMPLETED etc. will be sent, instead applications will be 'resumed'. This is very hard for me to handle in my application (auto-start, depends on SD-card etc). I think the best I could do right now is inform the user to disable Fast boot for the best experience. As this is a non-standard setting how can I detect if it is enabled? I would suggest looking into the ACTION_USER_PRESENT broadcast which is typically sent when the

spring boot入门 -- 介绍和第一个例子

爷,独闯天下 提交于 2019-11-29 10:42:26
转载:https://www.cnblogs.com/junyang/p/8151802.html “越来越多的企业选择使用spring boot 开发系统,spring boot牛在什么地方?难不难学?心动不如行动,让我们一起开始学习吧!” 使用Spring boot ,可以轻松的创建独立运行的程序,非常容易构建独立的服务组件,是实现分布式架构、微服务架构利器。Spring boot简化了第三方包的引用,通过提供的starter,简化了依赖包的配置。 Spring boot的优点 轻松创建独立的Spring应用程序。 内嵌Tomcat、jetty等web容器,不需要部署WAR文件。 提供一系列的“starter” 来简化的Maven配置。 开箱即用,尽可能自动配置Spring。 spring boot 快速入门 通过构建简单的REST应用,了解spring boot的开发基本流程,验证其简单、易用特性。 环境要求 Spring Boot 2.0.0.BUILD-SNAPSHOT 要求 Java 8 和 Spring Framework 5.0.2以上,Maven 3.2 以上或者Gradle 4。 本文使用 Spring Boot 1.5.9 、 Java8 和 Spring Framework 5.0.2.RELEASE以上,Maven 3.2

spring boot + gradle[草稿]

我与影子孤独终老i 提交于 2019-11-29 10:42:03
入门文档:https://github.com/qibaoguang/Spring-Boot-Reference-Guide 安装gradle 官方下载 https://gradle.org/gradle-download/,建议用迅雷。 环境变量配置:http://jingyan.baidu.com/article/4d58d541167bc69dd4e9c009.html 首先说一下使用 spring-boot 开始项目的一些注意事项(针对新手): 为了方便,请抛弃配置 XML ,真的很冗杂 全面支持 annotation 注解和 java config 用 spring-boot 提供的一系列 starter 开始你的项目 spring-boot 只是帮你更好的开始一个项目,而不是一个应用框架 请使用 IDEA 开发 开始一个web项目 插件配置: idea的模型 https://docs.gradle.org/current/dsl/org.gradle.plugins.ide.idea.model.IdeaModel.html spring boot插件(配置了该插件后才有 gradle bootRun任务) http://docs.spring.io/spring-boot/docs/current/reference/html/build-tool-plugins

Eclipse Spring boot项目热部署

让人想犯罪 __ 提交于 2019-11-29 10:41:47
spring boot项目 热部署 一,参考文档:springboot 热部署 note: 1.使用eclipse: project-->Build Automatically (选中) 2.Digital Twin 项目使用Spring boot 版本为:1.2.3.RELEASE,使用spring-boot-devtools无效. 查看Spring-boot-devtools,最低版本为1.3.0. 猜测Spring boot 整合Spring-boot-devtools最低版本为1.3.0 3.把SpringLoaded放入spring-boot-maven-plugin中,会导致端口占用,需要用控制面板关闭java程序,所有不推荐 二.3种方式的使用 1.使用springloaded 放入spring-boot-maven-plugin中(端口会被占用,不推荐) 在pom文件添加依赖 <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <dependencies> <dependency> <groupId>org.springframework</groupId>

spring boot swagger-ui.html 404

不打扰是莪最后的温柔 提交于 2019-11-29 10:34:31
很奇怪的问题,找了好久。 因为spring boot+swagger实现起来很简单。看下面三部曲: 1.pom添加两个swagger依赖. <!-- Swagger依赖包 --> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.8.0</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.8.0</version> </dependency> <!-- Swagger end --> 2.添加SwaggerAutoConfiguration. @Configuration @EnableSwagger2 public class SwaggerAutoConfiguration{ @Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .groupName("") .apiInfo(apiInfo()) .select()

How can linux boot code be written in C?

自作多情 提交于 2019-11-29 10:27:39
I'm a newbie to learning OS development. From the book I read, it said that boot loader will copy first MBR into 0x7c00, and starts from there in real mode. And, example starts with 16 bit assembly code. But, when I looked at today's linux kernel, arch/x86/boot has 'header.S' and 'boot.h', but actual code is implemented in main.c. This seems to be useful by "not writing assembly." But, how is this done specifically in Linux? I can roughly imagine that there might be special gcc options and link strategy, but I can't see the detail. I'm reading this question more as an X-Y problem. It seems to

springBoot

情到浓时终转凉″ 提交于 2019-11-29 10:26:07
前言   不是颠覆 spring 框架 ,而是对 spring 框架 整合其他的框架进行 封装和简化 ,   降低框架整合的门槛,让更多程序员或者初学者也可以做框架 整合的事情,   可以非常快速的搭建一个高度整合的一个项目。 什么是 Spring boot 框架   Spring boot 框架是构建所有 spring 应用程序的起点,   springboot 的设计目的是让您尽可能快的搭建和运行项目,   而不是预先编辑 spring 的配置文件(模板式的配置文件) Spring boot 特点概述 使 编码 变得更简单 使 配置 变得更简单 使 部署 变得更简单 使 监控 变得更简单 针对简单配置文件     两个思想 起步依赖     a) 不需要管理依赖包的版本号了( Spring 团队 pivotal 帮我们测试管理依赖包之间的兼容问题)     [maven 自 带的一个功能 ] 自动配置     采用默认的配置文件的方式来简单框架 的配置     工作原理:根据项目中加载的依赖包,动态去加载配置文件 Spring boot 的使用 创建项目的方式 网站 Idea 集成 命令行的工具   注:内嵌了 web 容器 整合 mybatis Dao 层接口添加 @Mapper 在 springBoot 启动 main 方法上面添加 @MapperScan 注解 如果使用

【微服务系列】Spring SpringMVC SpringBoot SpringCloud概念、关系及区别

懵懂的女人 提交于 2019-11-29 09:31:52
一、正面解读 Spring主要是基于IOC反转Beans管理Bean类,主要依存于SSH框架(Struts+Spring+Hibernate)这个MVC框架,所以定位很明确,Struts主要负责表示层的显示,Spring利用它的IOC和AOP来处理控制业务(负责对数据库的操作),Hibernate主要作用是数据的持久化到数据库。 SpringMVC是基于Spring的一个MVC框架,用以替代初期的SSH框架;(spring Framework本身没有Web功能,Spring MVC使用WebApplicationContext类扩展ApplicationContext,使得拥有web功能)。 Spring Boot是基于Spring4的条件注册的一套快速开发整合包。 三者的发展与联系: Spring 最初利用“工厂模式”( DI )和“代理模式”( AOP )解耦应用组件。大家觉得挺好用,于是按照这种模式搞了一个 MVC 框架(一些用 Spring 解耦的组件),用开发 web 应用( SpringMVC )。然后有发现每次开发都要搞很多依赖,写很多样板代码很麻烦,于是搞了一些懒人整合包( starter ),这套就是 Spring Boot 。 升级云-Spring Cloud:现在是大数据、云时代,上云是必然选择,那么Spring Cloud应运而生, 二、概念解读

Eclipse搭建第一个Spring boot项目

五迷三道 提交于 2019-11-29 09:21:17
创建Spring boot项目之前,默认大家都已经下载好了Eclipse和Maven,并配置好了相关的环境。 一、下载STS插件 要创建Spring boot项目,首先得下载相应的插件,进入Eclipse Marketplace 下载完成之后,我们就可以创建spring boot项目了。 二、创建Spring Boot项目 第一步 一定要保证网络好,不然无法创建 第二步 如果你创建的时候一直不显示下面的内容,那么可以把https改成http试试。 第三步,选择项目需要的依赖 第四步,点击next->finish 我的创建太慢了,所以我放弃这种方式。SpringBoot项目本质上也就是一个maven项目,使用上述方式只是帮我们初始化了,然鹅对于我这辣鸡电脑来说太慢了,所以我使用下面的方式。 (1)新建一个maven项目 (2)配置pom.xml < build > < plugins > <!-- 配置jdk的版本 --> < plugin > < groupId > org.apache.maven.plugins </ groupId > < artifactId > maven-compiler-plugin </ artifactId > < configuration > < source > 1.8 </ source > < target > 1.8 </ target

Android Boot-Up BroadCast Not invoking

…衆ロ難τιáo~ 提交于 2019-11-29 08:52:53
I am currently trying to make a broadcast receiver which will invoke after android device boots and then will run a background service. I have tried many examples but don't know where I'm going wrong. I am following this example: https://github.com/commonsguy/cw-advandroid/tree/master/SystemEvents/OnBoot I have imported this whole project in my workspace and tried to run. But the receiver didn't invoked or so. Please help me out. My Testing Device is: Motorolla Xoom with ICS 4.0.3 EDIT Manifest <uses-sdk android:minSdkVersion="8" /> <supports-screens android:anyDensity="true" android