项目 新建 Spring Starter Project,编辑 pom.xml 文件,引入依赖: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" ...
分类:
编程语言 时间:
2021-04-14 12:33:52
阅读次数:
0
linux 使用trap命令进行调试 Shell脚本在搪行时,会产生三个所谓的伪信号。三种伪信号如下:信号名称 产生条件EXIT 从函数中退出,或者整个脚本执行完毕ERR 当一条命令返回非零状态码,即命令执行不成功DEBUG 脚本中的每一条命令执行之前 vi trapdebug.sh #!/bin/ ...
分类:
系统相关 时间:
2021-04-14 12:02:07
阅读次数:
0
vi proc1.sh #!/bin/bash #此脚本期望的参数个数argno=1 if [ $# -ne $argno ]then echo "Usage: 'basename $0' PID-number" >&2fi if [ ! -f "/proc/$1" ]then echo "Proc ...
分类:
系统相关 时间:
2021-04-14 11:51:22
阅读次数:
0
一个有参数但无提示说明的脚本#login1.sh: 用户登录,判断用户输入的用户名和密码是否错误 vi login1.sh #!/bin/bash for ((i=0; i < 3; i++))do read username read password if test "$username" = ...
分类:
系统相关 时间:
2021-04-14 11:41:38
阅读次数:
0
vi file_can_execute_or_not1.sh #!/bin/bash #判断输入的参数个数是否为两个 if [ $# -lt 2 ]then echo "The num of parameter is not right! " exit 0fi #判断用户输入的第一个文件是否可以读i ...
分类:
系统相关 时间:
2021-04-13 12:56:38
阅读次数:
0
vi no_interaction_script1.sh #!/bin/bash #提示用户该脚本3秒后退出echo "This script will quit after 3 seconds. " #计时3s sleep 1echo -n "."sleep 1echo -n "."sleep 1 ...
分类:
系统相关 时间:
2021-04-13 12:16:49
阅读次数:
0
当tomcat服务器出现404、500错误时候希望能够给用户友好的现实界面;只需要在项目的web.xml中添加一些配置,显示我们自定义的404/500错误网页即可 打开%CATALINA_HOME%/conf/web.xml文件,在<web-app>标签中添加如下内容: 简单写一下404/500自定 ...
分类:
其他好文 时间:
2021-04-13 12:12:39
阅读次数:
0
vi string_array.sh #!/bin/bash city=(Nanjing Atlanta Massachusetts Marseilles) #建立一个简单的数组echo "Extracting Substring" #演示抽取子串功能echo ${city[*]:0} #抽取整个数 ...
分类:
编程语言 时间:
2021-04-13 12:08:59
阅读次数:
0
第一种方法:在pom.xml文件中增加如下标签 1 <build> 2 <resources> 3 <resource> 4 <directory>src/main/resource</directory> 5 <includes> 6 <include>**/*.xml</include> 7 < ...
分类:
其他好文 时间:
2021-04-13 11:47:23
阅读次数:
0
Mybatis的CRUD操作 我们在创建第一个项目自后,来进行数据库的操作; Mybatis在JDBC的基础上,对sql语句的执行进行了简化。 1.准备工作 1.1.创建我们的第二个项目,项目结构如下: 1.2.在pom.xml文件中引入资源文件导出的配置文件 <build> <resources> ...
分类:
其他好文 时间:
2021-04-13 11:46:49
阅读次数:
0