CMD 批处理 选择器
2015-09-02 16:55
417 查看
@echo off :select echo ********************************************************************************************* echo 1:开户 2:销户 3:账户冻结 4:账户止入 5:账户止出 echo 6:账户解冻 7:账户解除止入 8:账户解除止出 rem echo 10:新增科目 11:修改科目 echo 20:新增分录规则 21:修改分录规则 echo 30:资金冻结 31:资金解冻 echo 40:分录处理 echo ********************************************************************************************* set /p choice=请输入一个功能代码: if /i %choice%==1 goto run if /i %choice%==2 goto account if /i %choice%==3 goto account if /i %choice%==4 goto account if /i %choice%==5 goto account if /i %choice%==6 goto account if /i %choice%==7 goto account if /i %choice%==8 goto account if /i %choice%==20 goto run if /i %choice%==21 goto run if /i %choice%==30 goto run if /i %choice%==31 goto run if /i %choice%==40 goto run echo 输入无效请重新输入. goto select :run echo 功能处理开始... start jar.bat %choice% goto select :account echo 功能处理开始... set /p id=请输入一个账户的id: start jar.bat %choice% %id% goto select
调用另外的bat文件如下
java -jar my-spring-app.jar %1 %2 exit
外另附上如何用maven构成一个可执行的spring jar包
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>1.7</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <finalName>my-spring-app</finalName> <shadedArtifactAttached>true</shadedArtifactAttached> <shadedClassifierName>jar-with-dependencies</shadedClassifierName> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.******.*****.acc.Main</mainClass> </transformer> <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> <resource>META-INF/spring.handlers</resource> </transformer> <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> <resource>META-INF/spring.schemas</resource> </transformer> <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> <resource>META-INF/spring.tooling</resource> </transformer> </transformers> </configuration> </execution> </executions> </plugin> </plugins> </build>
<mainClass>用来指定程序的入口
用maven的install 命令执行后可生成一个叫 my-spring-app.jar 的包
直接用java -jar my-spring-app.jar 就可以运行了。
相关文章推荐
- git remote & origin master & 远程分支,git branch
- Java 命名小技巧
- win10小娜打开没有声音该怎么办?
- 【UI初级 连载二】------做一个100秒倒计时的程序,注意考虑,当程序进入后台时的情况。
- DbHelperSQL类
- 【Linux命令详解】8、Linux其他命令―(tty、startx、type)
- 【C++】String_COW(写时拷贝)
- php实例-对象与类
- round函数
- 如何通过SSH反向隧道,访问NAT后面的Linux服务器?
- 欢迎使用CSDN-markdown编辑器
- 存储过程 SET NOCOUNT ON
- tar bz2 gz比较
- 【java】反射机制
- 离线安装PM2
- Bootstrap
- Welcome to the world of Java! ^O^ cmd + notepad + HelloWorld
- 规则引擎的使用---积分例子
- JSP隐含对象与EL表达式中的隐含对象
- 检测python进程是否存活