Spring Boot的应用启动与关闭_禁用heapdump-程序员宅基地

技术标签: SpringBoot  

1. Spring Boot应用打包

spring Boot应用可以打成jar包,其中内嵌tomcat,因此可以直接启动使用。但是在Spring Boot应用启动之前,首先需要进行打包,本文讲述的是Maven工程的打包,打包需要的前提条件(pom.xml文件中的内容)是:


...

<packaging>jar</packaging>

...

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

...

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <mainClass>com.***.Application</mainClass>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

...

 
 
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35

打包命令为:

mvn clean package -Dmaven.test.skip=true


# Demo

$ mvn clean package -Dmaven.test.skip=true
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.example:myproject:jar:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.springframework.boot:spring-boot-maven-plugin is missing. @ line 38, column 17
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building myproject 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ myproject ---
[INFO] Deleting /Users/ltc/Spring Boot Demo/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ myproject ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ myproject ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /Users/ltc/Spring Boot Demo/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ myproject ---
[INFO] Not copying test resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ myproject ---
[INFO] Not compiling test sources
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ myproject ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ myproject ---
[INFO] Building jar: /Users/ltc/Spring Boot Demo/target/myproject-0.0.1-SNAPSHOT.jar
[INFO] 
[INFO] --- spring-boot-maven-plugin:1.5.0.RC1:repackage (default) @ myproject ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.861 s
[INFO] Finished at: 2017-01-13T15:31:32+08:00
[INFO] Final Memory: 26M/308M
[INFO] ------------------------------------------------------------------------
 
 
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52

或在eclipse中运行run -> Maven build...,在Goals中填写clean package -Dmaven.test.skip=true,运行,打包完成。

2. Spring Boot应用启动

Spring Boot的启动命令为:

java -jar application.jar


# Demo

$ java -jar target/myproject-0.0.1-SNAPSHOT.jar 

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.4.3.RELEASE)

2017-01-13 15:31:36.911  INFO 62119 --- [           main] com.test.Example                         : Starting Example on CN40723-N.local with PID 62119 (/Users/ltc/Spring Boot Demo/target/myproject-0.0.1-SNAPSHOT.jar started by liutianchi in /Users/ltc/Spring Boot Demo)
2017-01-13 15:31:36.916  INFO 62119 --- [           main] com.test.Example                         : No active profile set, falling back to default profiles: default
2017-01-13 15:31:36.981  INFO 62119 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@b1a58a3: startup date [Fri Jan 13 15:31:36 CST 2017]; root of context hierarchy
2017-01-13 15:31:38.602  INFO 62119 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2017-01-13 15:31:38.615  INFO 62119 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat
2017-01-13 15:31:38.616  INFO 62119 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.6
2017-01-13 15:31:38.718  INFO 62119 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2017-01-13 15:31:38.718  INFO 62119 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1740 ms
2017-01-13 15:31:38.927  INFO 62119 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2017-01-13 15:31:38.932  INFO 62119 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'metricsFilter' to: [/*]
2017-01-13 15:31:38.932  INFO 62119 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-01-13 15:31:38.932  INFO 62119 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-01-13 15:31:38.932  INFO 62119 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-01-13 15:31:38.932  INFO 62119 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2017-01-13 15:31:38.932  INFO 62119 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2017-01-13 15:31:38.932  INFO 62119 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'applicationContextIdFilter' to: [/*]
2017-01-13 15:31:39.217  INFO 62119 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@b1a58a3: startup date [Fri Jan 13 15:31:36 CST 2017]; root of context hierarchy
2017-01-13 15:31:39.310  INFO 62119 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/]}" onto java.lang.String com.test.Example.home()
2017-01-13 15:31:39.313  INFO 62119 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-01-13 15:31:39.313  INFO 62119 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-01-13 15:31:39.338  INFO 62119 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-01-13 15:31:39.338  INFO 62119 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-01-13 15:31:39.378  INFO 62119 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-01-13 15:31:39.665  INFO 62119 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/manage/metrics/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
2017-01-13 15:31:39.665  INFO 62119 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/manage/metrics || /manage/metrics.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-01-13 15:31:39.666  INFO 62119 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/manage/mappings || /manage/mappings.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-01-13 15:31:39.667  INFO 62119 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/manage/trace || /manage/trace.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-01-13 15:31:39.667  INFO 62119 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/manage/info || /manage/info.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-01-13 15:31:39.668  INFO 62119 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/manage/configprops || /manage/configprops.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-01-13 15:31:39.669  INFO 62119 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/manage/heapdump || /manage/heapdump.json],methods=[GET],produces=[application/octet-stream]}" onto public void org.springframework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint.invoke(boolean,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException,javax.servlet.ServletException
2017-01-13 15:31:39.669  INFO 62119 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/manage/autoconfig || /manage/autoconfig.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-01-13 15:31:39.673  INFO 62119 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/manage/env/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)
2017-01-13 15:31:39.673  INFO 62119 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/manage/env || /manage/env.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-01-13 15:31:39.674  INFO 62119 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/manage/health || /manage/health.json],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(java.security.Principal)
2017-01-13 15:31:39.675  INFO 62119 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/manage/dump || /manage/dump.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-01-13 15:31:39.677  INFO 62119 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/manage/shutdown || /manage/shutdown.json],methods=[POST]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.ShutdownMvcEndpoint.invoke()
2017-01-13 15:31:39.678  INFO 62119 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/manage/beans || /manage/beans.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-01-13 15:31:39.799  INFO 62119 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2017-01-13 15:31:39.809  INFO 62119 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0
2017-01-13 15:31:39.944  INFO 62119 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2017-01-13 15:31:39.949  INFO 62119 --- [           main] com.test.Example                         : Started Example in 4.292 seconds (JVM running for 4.726)
 
 
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56

3. Spring Boot应用关闭

Spring Boot应用关闭的前提条件是POM.xml添加以下内容:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
 
 
  
  • 1
  • 2
  • 3
  • 4
  • 1
  • 2
  • 3
  • 4

application.properties中添加:

#启用shutdown
endpoints.shutdown.enabled=true
#禁用密码验证
endpoints.shutdown.sensitive=false
 
 
  
  • 1
  • 2
  • 3
  • 4
  • 1
  • 2
  • 3
  • 4

关闭命令为:

curl -X POST host:port/shutdown


# Demo

$ curl -X POST http://localhost:8080/shutdown
{
   "message":"Shutting down, bye..."}


$ curl -X POST http://localhost:8080/manage/shutdown
{
   "message":"Shutting down, bye..."}
 
 
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

如果要配置路径,需要在application.properties中添加management.context-path=/manage,则关闭命令变为curl -X POST host:port/manage/shutdown

4. 安全验证

如果在关闭时需要安全验证,则在pom.xml文件中添加:

<dependency>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-starter-security</artifactId>
</dependency>
 
 
  
  • 1
  • 2
  • 3
  • 4
  • 1
  • 2
  • 3
  • 4

application.properties中添加:

#开启shutdown的安全验证
endpoints.shutdown.sensitive=true

#验证用户名
security.user.name=admin

#验证密码
security.user.password=admin
#角色
management.security.role=SUPERUSER

# 指定端口
management.port=8081

# 指定地址
management.address=127.0.0.1
 
 
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

关闭命令为:

curl -u admin:admin -X POST http://127.0.0.1:8081/manage/shutdown

# Demo

$ curl -u admin:admin -X POST http://127.0.0.1:8081/manage/shutdown
{
   "message":"Shutting down, bye..."}

转自

http://blog.csdn.net/quincuntial/article/details/54410916


版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/lsm135/article/details/67638700

智能推荐

linux主机安装wdcp,Linux主机快速安装WDCP管理面板的步骤-程序员宅基地

文章浏览阅读789次。wdcp支持两种安装方式:1. 源码编译, 此安装比较麻烦和耗时,一般是20分钟至一个小时不等,具体视配置情况而定。2. RPM包安装, 简单快速,,下载快的话,几分钟就可以完成。所以我一般采用第二种方法来安装管理面板。必备工具:Linux主机快速安装WDCP管理面板的步骤1、打开Xshell软件,用SSH账号及密码链接服务器。2、安装WDCP面板SSH命令执行: wget http://sof..._wdcp 安装代码

源码分析-使用newFixedThreadPool线程池导致的内存飙升问题-程序员宅基地

文章浏览阅读721次。前言使用无界队列的线程池会导致内存飙升吗?面试官经常会问这个问题,本文将基于源码,去分析newFixedThreadPool线程池导致的内存飙升问题,希望能加深大家的理解..._executors.newfixedthreadpool容易出现oom

深度 | 语音识别技术简史:从不温不火到炙手可热-程序员宅基地

文章浏览阅读1.4k次。作者 | 陈孝良,冯大航,李智勇来源 | AI科技大本营(ID: rgznai100)【导读】语音识别自半个世纪前诞生以来,一直处于不温不火的状态,直到 2009 年深度..._深度语音

navicat for mysql mac中文版_Navicat for MySQL Mac 版常用功能-程序员宅基地

文章浏览阅读1.1k次。Navicat for MySQL Mac 是一套管理和开发 MySQL 的理想解决方案,支持单一程序。这个功能齐备的前端软件为数据库管理、开发和维护提供了直观而强大的图形界面,给 MySQL 新手以及专业人士提供了一组全面的工具。主要功能包括 SQL 创建工具或编辑器、数据模型工具、数据传输、导入或导出、数据或结构同步等。SQL 创建工具Navicat SQL 创建工具视觉化 SQL 创建工具创..._navicat for mysql mac

endnote x9 word 闪退_endnote闪退-程序员宅基地

文章浏览阅读1.5w次,点赞2次,收藏2次。endnote x9 word 闪退https://support.clarivate.com/Endnote/s/article/EndNote-Problematic-field-codes-causing-jumping-cursor-the-range-cannot-be-deleted-or-other-problems-while-formatting?language=en_US..._endnote闪退

讲解数字签名,数字证书,验证码,信息摘要,以及java怎么产生一个数字证书的好文章...-程序员宅基地

文章浏览阅读195次。文章的源地址:[url]http://blog.sina.com.cn/s/blog_5a6e84190100anjm.html[/url]摘要:  在本文中,我用详细的语言和大量的图片及完整的程序源码向你展示了在 JAVA中如何实现通过消息摘要、消息验证码达到安全通信、以及用Java的工具生成数字证书,和用程序给数字证书签名、以及用签名后的数学证书签名applet突破applet..._java 国密数字证书签名不算摘要怎么办

随便推点

华硕笔记本linux双系统引导,华硕笔记本如何安装win7/win10双系统-程序员宅基地

文章浏览阅读1.1k次。从win10免费升级开始,基本所有新买的电脑预装的都是win10系统,但并不是所有人都喜欢新的事物,大部分的人更习惯于使用经典的win7系统,但又不好放弃最新的原装正版的win10。对此,安装win7/win10双系统不失为一种完美的选择,关键是要怎么安装双系统呢?一、工具准备2、现在win7系统镜像文件,保存至制作好的U盘启动盘根目录下;二、安装双系统1、把快启动U盘启动盘插入华硕笔记本的usb..._华硕电脑修复双系统引导

最佳替换算法模拟-程序员宅基地

文章浏览阅读2.3k次。定义最佳(Optimal)置换算法是指,其所选择的被淘汰页面,将是以后永不使用的,或许是在最长(未来)时间内不再被访问的页面。采用最佳置换算法,通常可保证获得最低的缺页率。但由于人们目前还无法预知一个进程在内存的若干个页面中,哪一个页面是未来最长时间内不再被访问的,因而该算法是无法实现的,但可以利用该算法去评价其它算法。算法过程现举例说明如下。 假定系统为某进程_最佳替换算法

Linux本地源内容怎么没有,Linux 设置本地源-程序员宅基地

文章浏览阅读116次。然后查看 repolist[root@TDB Packages]# yum repolist allLoaded plugins: refresh-packagekit, securityrepoidreponamestatusol6_isolocal-sourceenabled: 3,563repolist: 3,563发现状态已经正常了,然后再来安装[root@TDB Packages]# r..._linux allure generate 没有源文件

jmeter性能测试实战——基础篇_unrecognized vm option 'maxmetaspacesize=400m-程序员宅基地

文章浏览阅读1.1w次,点赞3次,收藏52次。一、下载jmeter安装包官网下载:https://jmeter.apache.org/download_jmeter.cgi配置插件:plugins manager 【参考网站:https://jmeter-plugins.org/install/Install/】把jar包放入你的JMeter根目录下的 lib/ext 目录运行jmeter,在选项中即可看到插件管理工具二、分布式..._unrecognized vm option 'maxmetaspacesize=400m

Python 、Smtp 发送邮件(163邮箱)_to adder-程序员宅基地

文章浏览阅读1.4k次。1、环境 window python 32 、使用 smtplib 库、 MIMEText 库3、 163 邮箱开启授权设置 #!/usr/bin/python#coding:utf-8import smtplibfrom email.mime.text import MIMETextdef sendmail(content): form_add..._to adder

element ui表单必填_vue+element-Ui实现简单的表单必填项验证(1)-程序员宅基地

文章浏览阅读2.8k次。在项目中,通常我们在提交表单的时候需要进行一个必填项的验证,在这里,就简单的介绍一下element提供的表单组件中的必填项验证通过阅读文档,可以得知el-form上是自带一个validate方法的对整个表单进行校验的方法,参数为一个回调函数。该回调函数会在校验结束后被调用,并传入两个参数:是否校验成功和未通过校验的字段。若不传入回调函数,则会返回一个 promise一、首先,我们要调用el-for..._element的表单如何监听必填校验

推荐文章

热门文章

相关标签