boot

Test native x86 programs, building bootable images/drives

旧街凉风 提交于 2019-12-04 20:21:58
I have the next problem: I'm working with NASM and building some native and compiling it on this way: nasm -f bin source -o out I'm getting my native program for x86. And now the most interesting, how can I make it bootable and then test it? As I think there are 3 ways to make bootable ( but for me, all they has failed :( ) using mkbt utility ( or another soft which is similar ) to write it to floppy disk building ISO image, with editing bootable sector in it manually write memory sector to usb/sd-card or another driver As for testing, all times rebooting PC is very bad, so it's better to use

Upgrade to Spring Boot 1.4

淺唱寂寞╮ 提交于 2019-12-04 20:06:54
Upgrade to Spring Boot 1.4 Spring Boot 1.4 is a big jump, and introduced lots of new test facilities and aligned with the new technology stack, such as Spring framework 4.3 and Hibernate 5.2 and Spring Security 4.1, etc. Spring Boot 1.4 New starter:spring-boot-starter-test Spring Boot 1.4 brings a new starter for test scope, named spring-boot-starter-test . Use the following: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> Instead of: <dependency> <groupId>com.jayway.jsonpath</groupId> <artifactId>json

SpringBoot中的日志

…衆ロ難τιáo~ 提交于 2019-12-04 19:50:47
默认情况下,Spring Boot会用 SLF4J + Logback 来记录日志,并用 INFO 级别输出到控制台。 SLF4J,即简单日志门面(Simple Logging Facade for Java),它可以看做是一个接口框架,并不提供具体的实现,具体的实现由类似于Log4j,Log4j2,Logback等等这样的日志框架去完成。 SLF4J让你的代码独立于任何特定的日志记录API,可以让我们的程序更加的健壮,不会让你因为不同日志的实现而导致的问题去分心。 如果我们在一个Spring Boot 的程序中去使用SLF4J,因为spring-boot-starter中就已经包含了有关slf4j的jar包。我们只需要通过LoggerFactory去获取即可: private static final Logger logger = LoggerFactory.getLogger(ResponseAop.class); 默认情况下,Spring Boot将日志输出到控制台,不会写到日志文件。如果要编写除控制台输出之外的日志文件,则需在application.yml中设置logging.file或logging.path属性。但是这俩属性同时配置的时候,只有logging.file生效! 生产环境会单独配一个日志文件,如果要在日志文件中读取application.xml中属性要注意

Bootstrap响应式导航栏

爱⌒轻易说出口 提交于 2019-12-04 19:15:48
一.创建一个导航栏的步骤 1.<nav></nav>标签添加 .navbar .navbar-default 2.像<nav>内部添加一个标题<div> 带有class .navbar-header,内部包含带有 class navbar-brand的<a>元素--让文本看起来大一号。 3.为导航栏添加连接 带有class .nav .navbar-nav的无序列表ul 二.创建一个响应式导航栏 1.<nav></nav>标签添加 .navbar .navbar-default 2.像<nav>内部添加一个标题<div> 带有class .navbar-header ,内部包含带有 带有 class .navbar-toggle data-toggle="collapse" 告诉按钮应该做什么, data-taregt="#exmple-navbar" 指示要切换的是哪个元素 的<button> 3.<button>加入三个 <span class="icon-bar"></span> 三条线 汉堡按钮 , <a class="navbar-brand" href="#">响应式导航</a> 导航标题 4.在带有class .navbar-header ,的div下面 ,插入一个div 带有 class .collapse navbar-collapse,包裹要折叠的内容。 5

Spring boot入门之-Jpa基本使用

为君一笑 提交于 2019-12-04 18:26:25
  近期由于工作需要,使用Spring boot来进行项目开发,现总结如下。   Spring boot简介,https://blog.csdn.net/qq_32403063/article/details/87948084   Spring boot项目创建,https://www.cnblogs.com/chansblogs/p/9293360.html,个人使用idea创建项目   Spring boot项目结构,https://blog.csdn.net/XWGXF_JJX/article/details/90742852,还有Config,用于配置Bean   Spring boot使用jpa链接mysql,https://blog.csdn.net/u014553029/article/details/80971878,参考配置      Spring boot操作数据库使用Jpa方式。主要分为三个步骤:     1) 创建实体类,需要明确实体类和指定表名。              2) 创建Dao层,需要集成两个接口类              3)创建Service层,明确为服务层              4)Controller对外提供接口             使用jpa调用RDS数据常有两种方式,一种是使用jpa默认自带的方法

win10下安装Ubuntu18.04双系统

非 Y 不嫁゛ 提交于 2019-12-04 16:56:21
win10下安装ubuntu18.04双系统 本人小萌新,大佬不喜勿喷,欢迎指出不足。 1安装空间 。 安装软件需要空间,安装系统也一样,而不一样之处在于,安装系统的空间需要自己指定,所以,选择一个盘,将数据备份,再格式化这个盘。额,没有多余的盘可以格式化怎么办? 那么,就需要自己进行储存了分区, 具体过程如下 【我的电脑右击】-->【管理】 压缩卷大小一般就是你选择安装新系统所处的大小,一般Ubuntu,60g够了,具体多少当然看自己的使用情况而定了 。 压缩完后我们可以看到有个空余空间,这时我们不要给他分配盘符 2制作系统启动盘 首先然后我们去Ubuntu的官网下载Ubuntu18.04的ISO镜像文件。下载网址: https://www.ubuntu.com/download/desktop 下载rufus:下载网址: https://rufus.akeo.ie/?locale=zh_CN 所有文件如下列表 打开rufus软件界面如下 插入U盘后会自动检查,如下: 选择同文件夹下的ubuntu镜像,配置如下: 格式化选项下面的用默认就好,记得保存U盘文件。 然后点击开始:弹出窗口,默认,ok 格式化文件: 确认后看到如下界面 : 刻入完成即可 : 刻入完成后的U盘内部 : 3,安装系统 进入BIOS设置U盘启动: 这个时候插入U盘,我们点击关机关闭win10,然后开机

Run shell script after XServer is started?

纵饮孤独 提交于 2019-12-04 16:45:29
How to run shell script when XServer is started and lightdm also. I tried with init.d and rc.local in /etc directory, but my script is calling an gui application so that the reason I need to run it after XServer is started. I am using Debian Jessie. According to this link .xinitrc in your home directory will be read and executed, otherwise the default /etc/X11/xinit/xinitrc is used. So you should be able to create this file and have the shell script started. 来源: https://stackoverflow.com/questions/35633594/run-shell-script-after-xserver-is-started

spring boot 使用application.properties 进行外部配置

时光总嘲笑我的痴心妄想 提交于 2019-12-04 16:33:13
本文转载自; http://blog.csdn.net/yingxiake/article/details/51260302 application.properties大家都不陌生,我们在开发的时候,经常使用它来配置一些可以手动修改而且不用编译的变量,这样的作用在于,打成war包或者jar用于生产环境时,我们可以手动修改环境变量而不用再重新编译。 spring boo默认已经配置了很多环境变量,例如,tomcat的默认端口是8080,项目的contextpath是“/”等等,可以在这里看spring boot默认的配置信息 http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-external-config spring boot允许你自定义一个application.properties文件,然后放在以下的地方,来重写spring boot的环境变量或者定义你自己环境变量 当前目录的 “/config”的子目录下 当前目录下 classpath根目录的“/config”包下 classpath的根目录下 1点和2点适合在生产环境下,例如,打包成可执行的jar包 这里要注意,“当前目录”是指demo.jar包的目录下,要使配置文件生效,在使用 Java

Spring Boot中以代码方式配置Tomcat

白昼怎懂夜的黑 提交于 2019-12-04 15:41:35
在Spring Boot2.0以上配置嵌入式Servlet容器时EmbeddedServletContainerCustomizer类不存在,经网络查询发现被WebServerFactoryCustomizer替代. Spring Boot 1.0中: 通用配置举例 @Component public static class CustomServletContainer implements EmbeddedServletContainerCustomizer{ @Override public void customize(ConfigurableEmbeddedServletContainer container) { container.setPort(8888);//配置端口 container.addErrorPages(new ErrorPage(HttpStatus.NOT_FOUND, "/404.html"));//配置错误页面 container.setSessionTimeout(10,TimeUnit.MINUTES);//配置用户会话过期时间 } } 特定配置举例 以Tomcat为例。 @Bean public EmbeddedServletContainerFactory servletContainer() {