boot

How do I debug a process that starts at boot time?

落爺英雄遲暮 提交于 2019-12-02 20:50:19
I am trying to set a breakpoint into a Windows service that starts at boot time. Because of an unfortunate mistake on my end, the service forces the machine into a reboot loop: this means that I can't get to a stable state from which I could deploy a fix, and obviously I can't try to debug the service at a more convenient time. I can use windbg in kernel mode. I'd very much like to break when the service hits the wmain function, but I'm having issues with that. Up to now, I found that I can stop when the image is loaded by using the following commands: !gflag +ksl sxe ld MyServiceExecutable

Startup script with systemd in Linux

雨燕双飞 提交于 2019-12-02 20:49:22
Can I do This start up service below, there are no errors showing once run, but the server script below does not run! ln /lib/systemd/aquarium.service aquarium.service systemctl daemon-reload systemctl enable aquarium.service systemctl start aquarium.service thanks aquarium.service: [Unit] Description=Start aquarium server [Service] WorkingDirectory=/home/root/python/code/aquarium/ ExecStart=/bin/bash server.* start KillMode=process [Install] WantedBy=multi-user.target here is the server.sh script #!/bin/bash PID="" function get_pid { PID=`pidof python ./udpthread.py` } function stop { get_pid

基本springboot 2.0版本 spring-cloud的使用(注册中心)

匿名 (未验证) 提交于 2019-12-02 20:37:20
Spring Cloud与Spring Boot版本匹配关系 Spring Cloud Spring Boot Finchley 兼容Spring Boot 2.0.x,不兼容Spring Boot 1.5.x Dalston和Edgware 兼容Spring Boot 1.5.x,不兼容Spring Boot 2.0.x Camden 兼容Spring Boot 1.4.x,也兼容Spring Boot 1.5.x Brixton 兼容Spring Boot 1.3.x,也兼容Spring Boot 1.4.x Angel 兼容Spring Boot 1.2.x 从Spring Cloud与Spring Boot版本匹配关系可以看出,如果项目使用的spring boot 版本在 2.0以上,那么必须使用spring cloud 版本 为 Finchley.RELEASE版本 这个版本与以前的D版本有一些区别,下面主要讲的就是spring cloud F版本的简单使用 服务的注册与发现Eureka(Finchley版本) Eureka是一个基于REST(Representational State Transfer)的服务,主要用于AWS cloud, 提供服务定位(locating services)、负载均衡(load balancing)、故障转移(failover of

spring boot֮org.springframework.boot.context.TypeExcludeFilter

匿名 (未验证) 提交于 2019-12-02 20:37:20
曾经碰到过这样一种情况,想让某个使用了spring 注解的类不被spring扫描注入到spring bean池中,比如下面的类使用了@Component和@ConfigurationProperties("example1.user")自动绑定属性,不想让这个类被注入。 1 package com.github.torlight.sbex; 2 3 import java.io.Serializable; 4 5 import org.springframework.boot.context.properties.ConfigurationProperties; 6 import org.springframework.stereotype.Component; 7 8 @Component 9 @ConfigurationProperties("example1.user") 10 public class User implements Serializable{ 11 12 private static final long serialVersionUID = 6913838730034509179L; 13 14 private String name; 15 16 private Integer age; 17 18 public String getName() {

Spring Boot 整合 MyBatis 连接 Oracle数据库

匿名 (未验证) 提交于 2019-12-02 20:37:20
1、Spring Boot项目添加MyBatis依赖和Oracle驱动: <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.3.2</version> </dependency> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.1.0</version> </dependency> 2、配置application.properties: #spring.datasource.driver-class-name=com.mysql.jdbc.Driver #spring.datasource.url=jdbc:mysql://localhost:3306/ems #spring.datasource.username=root #spring.datasource.password=root mybatis.mapper-locations=classpath:/com/example/demo/mapper/*.xml server.port=9090

SpringBoot_第一个程序

喜你入骨 提交于 2019-12-02 20:11:38
快速开发一个Spring boot程序步骤如下: 1、创建一个Spring boot项目; 1、可以采用方式一: 使用 eclipse 的 Spring Tool Suite (STS) 插件/或者 IDEA 自带的插件创建; 2、可以采用方式二:直接使用 Maven 创建项目的方式创建; STS创建springboot项目 完成后项目的基本结构 IDEA创建springboot项目 2、在项目的pom.xml中加入Spring boot 的父级和起步依赖,如果已经有了就不需要加了; 进入SpringBoot的官网查看最新配置,这里仅做演示: https://spring.io/projects/spring-boot 1、父级依赖: <!--继承父级依赖--> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.5.RELEASE</version> <relativePath/> </parent> 2、起步依赖:加入Spring boot父级依赖可以简化我们项目的Maven配置; <!--springboot web项目的起步依赖,不需要写版本号,从父级继承过来--> <dependency>

SpringBoot_入门

天大地大妈咪最大 提交于 2019-12-02 20:09:17
Spring boot 简介 1、Spring boot是Spring家族中的一个全新的框架,它用来简化Spring应用程序的创建和开发过程,也可以说Spring boot能简化我们之前采用Spring mvc + Spring + MyBatis 框架进行开发的过程; 2、在以往我们采用 Spring mvc + Spring + MyBatis 框架进行开发的时候,搭建和整合三大框架,我们需要做很多工作,比如配置web.xml,配置Spring,配置MyBatis,并将它们整合在一起等,而Spring boot框架对此开发过程进行了革命性的颠覆,抛弃了繁琐的xml配置过程,采用大量的默认配置简化我们的开发过程; 3、所以采用Spring boot可以非常容易和快速地创建基于Spring 框架的应用程序,它让编码变简单了,配置变简单了,部署变简单了,监控变简单了; 4、正因为 Spring boot 它化繁为简,让开发变得极其简单和快速,所以在业界备受关注; 5、Spring boot 在国内的关注趋势图: http://t.cn/ROQLquP Spring boot 的特性 1、能够快速创建基于Spring的应用程序; 2、能够直接使用java main方法启动内嵌的Tomcat, Jetty 服务器运行Spring boot程序,不需要部署war包文件; 3

Spring Boot 的各种start

五迷三道 提交于 2019-12-02 19:49:51
新建一个springBoot项目时,你会选择很多依赖,在项目中的build.gradle中你会看见各种start,例如下边的代码: 今天就在这里列举一下各种start: 1、spring-boot-starter   Spring Boot核心starter,包含自动配置、日志、yal配置文件支持 2、spring-boot-starter-actuator   准生产特性、用于监控和管理应用 3、spring-boot-starter-remote-shell   提供基于ssh协议的监控和管理 4、spring-boot-starter-amqp   使用spring-rabbitlai zhichi AMQP 5、spring-boot-starter-aop   使用spring-aop和AspectJ支持面向切面编程 6、spring-boot-starter-batch   对Spring Batch的支持 7、spring-boot-starter-cache   对Spring Cache的抽象支持 8、spring-boot-starter-cloud-connectors   对云平台(Cloud Foundry、Heroku)提供的服务提供简化的连接方式 9、spring-boot-starter-data-elasticsearch   通过spring

运维

谁说胖子不能爱 提交于 2019-12-02 19:00:41
运维自动化发展历程及技术应用 什么是自动化的安装部署操作系统? 在工作中我们可能经常部署很多台主机,手工的一台一台的安装只适合主机非常少的情况,但大的互联网公司在一些特殊的日子要部署大量的主机,以应对要到来的特大流量访问。这时候我们就不能,一台一台的安装主机了,一是效率太慢,二是太累,三是费时间。基于这个情况我们可以自动化的一起部署很多的主机,而不用我们人工一台一台的去安装部署,节约了大量的时间。 centos 6的启动流程 1.POST开机加电自检 2.MBR 读取硬盘mbr引导的前446字节,属于grub的stage1第一阶段 3.进入grub的stage1.5阶段,加载/boot分区所在的文件系统驱动 4.进入grub的stage2阶段,关键的文件已经在/boot/grub目录里面了,关键的文件 有/boot/grub.grub.conf文件,文件里面kernel /vmlinuz root=/dev/sda2,定义了内核文件所在的位置 5.加载vmlinuz内核,完成以后找/根目录,想要加载根文件系统,需要识别根所在的文件系统驱动,配合/boot/目录里面两个重要的文件,一个是vmlinuz内核文件和initramfs驱动文件完成加载根文件系统 6.加载完成根文件系统以后,启动根下面的第一个进程/sbin/init,这个进程要读取/etc/inittab配置文件

0xffff0 and the BIOS

心不动则不痛 提交于 2019-12-02 18:53:29
When a pc first boots up, it starts executing at physical address 0xffff0. This address contains a jmp instruction to the BIOS. Now for my question, I always assume the physical addresses are mapped to RAM. If RAM initially contains garbage values, what exactly puts the jmp instruction in 0xffff0? Is the jmp instruction always the same or is it different for different BIOS's? Does 0xffff0 map from RAM to BIOS then (meaning it's "hard mapped")? The top 64kB or so are mapped to BIOS ROM, not RAM. Take a look at PC boot sequence . As Ignacio already answered, it's "hard-mapped" to BIOS read-only