- Spring 5.0 By Example
- Claudio Eduardo de Oliveira
- 183字
- 2021-06-24 19:17:33
Command line via the JAR file
To run it through the Java file, we need to compile and package it, and then we can run the project with the Java command line. To compile and package it, we can use the pretty standard Maven command like this:
mvn clean install
After the project is compiled and packaged as a Fat-JAR, we can execute the JAR file, go to the target folder and check the files from this folder, probably the result will look like this:

We have two main files in our target folder, the cms-0.0.1-SNAPSHOT.jar and the cms-0.0.1-SNAPSHOT.jar.original, the file with the .original extension is not executable. It is the original artifact resulting from the compilation, and the other is our executable file. It is what we are looking for, let's execute it, type the following command:
java -jar cms-0.0.1-SNAPSHOT.jar
The result should be as displayed. The application is up and running:

That is it for this part, in the next section, we will create the first REST (Representational State Transfer) resources and understand how the REST endpoints work.
- DevOps:軟件架構(gòu)師行動指南
- Java程序設(shè)計(慕課版)
- MySQL數(shù)據(jù)庫管理實戰(zhàn)
- 流量的秘密:Google Analytics網(wǎng)站分析與優(yōu)化技巧(第2版)
- Mastering RabbitMQ
- 高效微控制器C語言編程
- PHP程序設(shè)計(慕課版)
- C語言程序設(shè)計基礎(chǔ)與實驗指導
- VSTO開發(fā)入門教程
- Expert Android Programming
- 從0到1:Python數(shù)據(jù)分析
- 單片機C語言程序設(shè)計實訓100例
- 西門子S7-200 SMART PLC編程從入門到實踐
- 匯編語言編程基礎(chǔ):基于LoongArch
- 代碼閱讀