boot

SpringBoot学习笔记(一)

久未见 提交于 2019-11-30 19:49:18
一、SpringBoot 1,SpringBoot简介 Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程。该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置。通过这种方式,Spring Boot致力于在蓬勃发展的快速应用开发领域(rapid application development)成为领导者。 Spring框架是Java平台的一种开源框架,提供有控制反转特性的容器(ioc容器),ioc旨在方便项目维护和测试,他提供一种通过Java的反射机制对Java的对象进行统一的配置和管理的方法,同时通过ioc容器管理对象的生命周期,通过扫描xml文件或类上特定Java注解来配置对象,程序员可以通过依赖查找和依赖注入来获取对象。springAop框架基于代理模式,aop框架针对模块之间的交叉点进行模块化。spring框架下的事务管理,远程访问等功能均可以通过使用SpringAOP技术实现,spring的事务管理框架为Java平台带来了一种抽象机制,使所有的事务能够与保存点一起工作,并且可以在 在 Spring 体系中,Spring Boot JPA 就是约定优于配置最佳实现之⼀,不需要关注表结构,我们约定类名即是表名,属性名即是表的字段,String 对应 varchar,long 对应

Spring Boot学习(一)初识Spring Boot

夙愿已清 提交于 2019-11-30 18:56:24
本文借鉴: Spring Boot【快速入门】 (特此感谢!) Spring Boot 概述   Spring Boot 是所有基于 Spring 开发的项目的起点。Spring Boot 的设计是为了让你尽可能快的跑起来 Spring 应用程序并且尽可能减少你的配置文件。 什么是 Spring Boot 它使用 “ 习惯优于配置 ” (项目中存在大量的配置,此外还内置一个习惯性的配置)的理念让你的项目快速运行起来。 它并不是什么新的框架,而是默认配置了很多框架的使用方式,就像 Maven 整合了所有的 jar 包一样,Spring Boot 整合了所有框架 使用 Spring Boot 有什么好处   回顾我们之前的 SSM 项目,搭建过程还是比较繁琐的,需要: 配置 web.xml,加载 spring 和 spring mvc 配置数据库连接、配置日志文件 配置家在配置文件的读取,开启注解 配置mapper文件 .....   而使用 Spring Boot 来开发项目则只需要非常少的几个配置就可以搭建起来一个 Web 项目,并且利用 IDEA 可以自动生成生成,这简直是太爽了... 一句话小结   Spring Boot 整合了所有框架,简单、快速、方便地搭建项目,且对主流开发框架的无配置集成,极大提高了开发、部署效率。 来源: https://www.cnblogs.com

Boot/ScreenOn Broadcast Receiver not working

冷暖自知 提交于 2019-11-30 17:18:15
问题 I have a blank HelloWorld Application: package tutorials.TestReceivers; import android.app.Activity; import android.os.Bundle; public class TestReceiversActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } With this BootReceiver.Java: package tutorials.TestReceivers; import android.content.BroadcastReceiver; public class BootReceiver

Android autostart application

别来无恙 提交于 2019-11-30 16:11:06
How can I autostart my application's service at device boot (with the possibility of enabling/disabling this feature)? What permissions do I have to include in AndroidManifest? Thanks this permission are use <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> In your <application> element (be sure to use a fully-qualified [or relative] class name for your BroadcastReceiver): <receiver android:name="com.example.MyBroadcastReceiver"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> </intent-filter> </receiver> In MyBroadcastReceiver.java:

初始化spring boot中遇到的问题

大兔子大兔子 提交于 2019-11-30 15:47:22
无法连接到localhost:8080 1234 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId></dependency> pom.xml中的这段代码改成 1234 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId></dependency> spring-boot-starter和spring-boot-starter-web的区别: spring-boot-starter 是Spring Boot的核心启动器,包含了自动配置、日志和YAML spring-boot-starter-web 支持全栈式Web开发,包括Tomcat和spring-webmvc 相关参考 Spring Boot的启动器Starter详解 访问localhost:8080时出现Whitelabel Error Page 需要输入在类中输入注解 @RequestMapping("/") 来映射地址,为了使用 @RequestMapping("/") ,必须在头部导入 org

黑马_13 Spring Boot:04.spring boot 配置文件

僤鯓⒐⒋嵵緔 提交于 2019-11-30 14:46:54
13 Spring Boot: 01.spring boot 介绍&&02.spring boot 入门 04.spring boot 配置文件 SpringBoot基础 四、 SpringBoot 的配置文件 SpringBoot 配置文件类型和作用 SpringBoot 是基于约定的,所以很多配置都有默认值,但如果想使用自己的配置替换默认配置的话,就可以使用 application.properties 或者 application.yml ( application.yaml )进行配置。 application.properties #tomcat服务器的端口号 server.port=8888 #当前web应用的名称 server.servlet.context-path= 其中, application.properties 文件是键值对类型的文件,之前一直在使用,所以此处不在对 properties 文件的格式进行阐述。 除了 properties 文件外, SpringBoot 还可以使用 yml 文件进行配置,下面对 yml 文件进行讲解。 ==================== end 来源: https://www.cnblogs.com/MarlonKang/p/11598412.html

自己制作一个简单的操作系统二[CherryOS]

♀尐吖头ヾ 提交于 2019-11-30 13:36:00
自己制作一个简单的操作系统二[CherryOS] 我的上一篇博客 自己制作一个简单的操作系统一[环境搭建] , 详细介绍了制作所需的前期准备工作 一. 一点说明    这个操作系统只是第一步, 仅仅是开机显示一个hello cherryos, 不够万物开头都是 hello xxxx 不是吗?(┗( ´・∧・`)┛) 特别说明一下: 我们需要在一个纯英文的路径里制作自己的操作系统. 为什么, 为啥 我也不知道;   我的路径是: 二. 开始编写 1. 使用一个文本编辑器在上述目录下新建一个文件, boot.sam 2. 在boot.asm中写入以下汇编代码, 汇编不会? 去学啊!!! org 07c00h ; 告诉编译器程序加载到7c00处 mov ax, cs mov ds, ax mov es, ax call DispStr ; 调用显示字符串例程 jmp $ ; 无限循环 DispStr: mov ax, BootMessage mov bp, ax ; ES:BP = 串地址 mov cx, 16 ; CX = 串长度 mov ax, 01301h ; AH = 13, AL = 01h mov bx, 000ch ; 页号为0(BH = 0) 黑底红字(BL = 0Ch,高亮) mov dl, 0 int 10h ; 10h 号中断 ret BootMessage: db

Get the boot time in objective c

旧巷老猫 提交于 2019-11-30 13:32:39
问题 how can i get the boot time of ios in objective c ? Is there a way to get it? 回答1: Don't know if this will work in iOS, but in OS X (which is essentially the same OS) you would use sysctl(). This is how the OS X Unix utility uptime does it. Source code is available - search for "boottime". #include <sys/types.h> #include <sys/sysctl.h> // .... #define MIB_SIZE 2 int mib[MIB_SIZE]; size_t size; struct timeval boottime; mib[0] = CTL_KERN; mib[1] = KERN_BOOTTIME; size = sizeof(boottime); if