使用maven 将springboot打成jar包

springboot瘦身打包(jar)配置(maven打包) 阅读详情

一、pom附例 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.4.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.faw</groupId>
    <artifactId>cxjc-oss</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>cxjc-oss</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>


    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>

        <!--swag-->
        <dependency>
            <groupId>com.spring4all</groupId>
            <artifactId>swagger-spring-boot-starter</artifactId>
            <version>1.8.0.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>25.1-jre</version>
        </dependency>

        <dependency>
            <groupId>com.diffplug.guava</groupId>
            <artifactId>guava-cache</artifactId>
            <version>19.0.0</version>
        </dependency>
        <!--swag-->


        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>3.16</version>
        </dependency>


        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.9.5</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.9.5</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>2.9.5</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.9.12</version>
        </dependency>
        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.4</version>
            <classifier>jdk15</classifier>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.41</version>
        </dependency>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjlib</artifactId>
            <version>1.6.2</version>
        </dependency>

        <!--common-->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.1</version>
        </dependency>
        <dependency>
            <groupId>commons-pool</groupId>
            <artifactId>commons-pool</artifactId>
            <version>1.5.6</version>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.1</version>
        </dependency>
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.2</version>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.3</version>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1</version>
        </dependency>

        <!--easypoi-->
        <dependency>
            <groupId>cn.afterturn</groupId>
            <artifactId>easypoi-base</artifactId>
            <version>3.0.1</version>
        </dependency>
        <dependency>
            <groupId>cn.afterturn</groupId>
            <artifactId>easypoi-annotation</artifactId>
            <version>3.0.1</version>
        </dependency>
        <dependency>
            <groupId>cn.afterturn</groupId>
            <artifactId>easypoi-web</artifactId>
            <version>3.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <version>4.3.5</version>
        </dependency>


    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>



            <!-- 1、设置jar的入口类 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                            <mainClass>com.faw.Application</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>


            <!--2、把附属的jar打到jar内部的lib目录中 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>


            <!-- 3、打包过程忽略Junit测试 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>


        </plugins>
    </build>

</project>

二、主要注意三点:

1、设置jar入口类

2、把依赖的jar包打到生成的jar内部的lib目录下

3、打包时忽略junit测试

三、jar打包&执行

1、maven打包:mvn clean package

生成的jar包会在项目的target目录下

2、运行jar包,命令行下:

java -jar xxxx.jar

SQL实现数据仓库ETL:分层设计、增量抽取与性能优化实践 在数据仓库建设过程中,ETL(抽取、转换、加载)是数据流转的核心环节。传统观点常将ETL与专业工具或大数据框架绑定,但在中小规模数据场景下,基于SQL的ETL方案凭借低门槛、高可维护性和直观的排错体验,成为高效且务实的选择。本文从ETL的基础概念出发,阐述数据仓库分层(ODS、DWD、DWS、ADS)中每层ETL的定位与职责,重点剖析增量抽取策略(时间戳、主键、日志)下的SQL实现方式,以及数据清洗、去重和格式化的常见写法。同时,结合真实项目经验,分享慢SQL优化技巧、任务调度依赖设计、幂等性保障和常见问题 阅读详情

相关推荐

通达信强龙趋势幅图指标 - 精准捕捉趋势,把握强势行情,多角度分析个股,强弱一目了然

STICKLINE(趋势>0 AND SJTJ,4.8,5.8,1.5,0),COLORYELLOW;STICKLINE(资金>0 AND SJTJ,1.2,2.2,1.5,0),COLOR0080FF;STICKLINE(异动>0 AND SJTJ,0,1,1.5,0),COLORFF0080;STICKLINE(异动=0 AND SJTJ,0,1,1.5,1),COLORGRAY;

Q1809330692的博客 5633

如何使用maven将spring boot项目打成jar包

如果你使用的是maven来管理项目,执行以下命令即可 cd 项目跟目录(和pom.xml同级) mvn clean package ## 或者执行下面的命令 ## 排除测试代码后进行打包 mvn clean package -Dmaven.test.skip=true 也可以在eclipse中直接打包,步骤如下: 右键选择项目 Run As--&gt;Maven build... ...

IT的鱼 715

OpenClaw(原Clawdbot/Moltbot)本地部署快速指南

支持Telegram、Slack、Discord、iMessage等多平台接入,通过配置文件或环境变量填写对应平台的Token,配置后执行。支持对接OpenAI、Anthropic、阿里云百炼等云端模型,也可搭配Ollama使用本地模型。默认仅允许已配对用户交互,群聊场景建议开启Docker沙箱模式,在配置文件设置。执行后跟随指引确认安全说明,进入QuickStart模式,默认网关端口为。可查看已加载模型,通过绑定的通讯通道发送测试指令,响应正常即部署完成。,限制非主会话操作权限,提升安全性。

wukangjupingbb的博客 8479

Spring boot 项目用maven build 打jar包

这过程可能会遇到很多问题,需要一个个百度(问题基本都是pom文件配置不对导致,我修改了一天的配置,一个个解决后才成功构建了jar包),下面记录一下pom.xml配置。结果jar包正常启动未报错,通过项目代码也能成功调用接口,说明一切这个包没问题,可直接使用,后面我是吧jar拿到linux服务器上启动,没问题后再打成docker镜像部署即可。进入到jar包所在文件夹(我这里构建成功后,jar直接发送到了maven仓库,具体地址可以看控制台的日志输出),打开cmd命令窗口,执行下面命令启动,观察是否报错。

qq_44537828的博客 3645

手把手教你自制Type-C OTG转换器(附电路图及避坑指南)

本文详细指导如何自制Type-C OTG转换器,包括核心电路设计、元器件选型及焊接技巧,特别强调硬件检测电路的关键作用。通过实测数据和避坑指南,帮助开发者解决兼容性问题,实现高效数据传输。

weixin_27038245的博客 714

在Visual Studio中搭建Dynamo Python开发环境,效率飞一般的增长

在Visual Studio中搭建Dynamo Python开发环境,效率飞一般的增长

BIM的乐趣 1730

如何在 Spring Boot 中使用 Maven 构建可执行 JAR

How to build executable JAR with Maven in Spring Boot - Websparrowhttps://www.websparrow.org/spring/how-to-build-executable-jar-with-maven-in-spring-boot 在本教程中,我们将学习如何在 Spring Boot 应用程序中使用 Maven 构建可执行 JAR。Spring Boot 提供spring-boot-maven-plugin来创建或构建 Spr

allway2的博客 2748

HP DL380G9 iLO降级Degrated及存储失败storage Failed报错如何解决?

HP DL380G9 iLO降级(Degrated)及存储失败(storage Failed)报错如何处理? ©Lander Zhang 专注外企按需IT基础架构运维服务,IT Helpdesk 实战培训践行者https://blog.51cto.com/lander 2018/09/7 7:30 问题描述 某沙特公司搭建的虚拟化环境中有一台ESXi主机报Storage Fialed警告但是仍...

weixin_34226182的博客 4849

Spring Boot 项目中使用Maven打jar包

在Spring Boot 项目中, 使用Maven 打包, 得到可以直接运行的jar包, 此时经常会出现的报错, 或者打包的结果是一个, 也不能直接通过java -jar命令运行。

qq_42742845的博客 1451

OpenClaw 在 Docker 容器中的部署实战——零配置启动

本文介绍了OpenClaw在Docker容器中的快速部署方法,对比了本地部署与容器化部署的优势。通过官方镜像和Docker Compose两种方式,5分钟即可完成部署,并详细讲解了配置管理方案(挂载配置文件和环境变量)。文章还提供了飞书集成配置方法,以及生产环境下的日志管理、资源限制、健康检查等优化建议。最后包含常见问题排查指南,帮助开发者快速实现OpenClaw的容器化部署。

刘一说的IT专栏 905

【嘉立创EDA】PCB金属包边设计快捷方法

本文使用嘉立创EDA,描述如何在PCB设计时,快速增加边框包边设计,特别是金属包边(伪)——这里标记(伪)是因为该这里的包边特指不含边缘壁。请参考本文时特别注意!本文将此过程记录,以供有需要的读者参考。

l64481000的博客 1744

在idea中springboot打成jar包并手动导入jar包到maven项目解决办法

在idea中springboot打成jar包并手动导入jar包到maven项目解决办法 第一步: 先建立好一个springboot项目,执行以下操作: ![在这里插入图片描述](https://img-blog.csdnimg.cn/20191108102114299.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow...

AI_qiaobiluo的博客 1179

【数据集处理】基于ERA5 气温/湿度数据计算湿球温度并判别湿热浪

【数据集处理】基于ERA5 气温/湿度数据计算湿球温度并判别湿热浪

WW、forever的博客 488

在idea中spring boot打成jar包,安装到 Maven 本地仓库

在idea中spring boot打成jar包,安装到 Maven 本地仓库 本人写的可能比较复杂,也有更简便的方法进行保存到maven本地仓库,下面是我自己第一次想到的操作 具体步骤如下 首先第一步: 将我们准备好的springboot项目,打成jar包,操作如下: 提示:点击运行后进行打包,在这个打包期间项目中不能出现错误,否则会出现打包错误! 打包完成后jar包一般会在target目录下:...

m0_45277005的博客 1231

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

在eclipse中使用maven将spring boot项目打成jar包

目录 1.修改eclipse运行环境 2.在项目的pom.xml文件中增加构建配置 3.编译打包 1.修改eclipse运行环境 a.在Eclipse->Window->Preferences->Java->Installed JREs->Add...->Standard VM里,JRE home选择JDK的目录。 b.设置Default VM...

E=mc² 5758

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

IDEA 使用maven将Springboot打成jar包

IDEA 使用maven将Springboot打成jar包 不得不说idea打jar包真的很坑,弄了半天也没弄好,网上的方法都是直接复制粘贴或者照搬别人的,真不知道这些博主到底亲自试过没有?? 一开始报错 找不到主类 然后按照网上的方法(这个直接上图就能懂,不用我说,网上一搜一大堆): PS: 这种方法根本不行!!! 导出jar包后运行,仍旧会果报错(无法自动配置): java.lang.Il...

Alaskyed的博客 606

springboot + maven中将打成jar包

springboot + maven中将打成jar包

weixin_67490867的博客 4103

maven给springboot项目打成jar包 maven springboot打包配置

${JAVA_1_4_HOME}/bin/javac

fanhaifeng66的专栏 1814

vue+maven+springboot打成jar包部署

后端中的application.yml的上下文路径与vue中的.env.production后端前缀对应。目录下的内容,将其包含在最终的构建产物中。因此,通常不需要特别的配置来包含。访问:http://localhost:port/test。Maven 项目,默认情况下,Maven 会自动处理。vue项目的.env.production文件修改。二、maven打包时包含resource静态文件。

lqm1234567的博客 383

spring boot maven项目打成jar包

千万不要用Intellij idea来打包项目为Jar,你应该来到项目的根目录,然后用 mvn clean package 这个命令来打包。然后在命令窗口中进入到target目录,然后执行java -jar XXX.jar 命令即可启动项目。然后在target目录下,可以得到jar文件。

冷冷疯狂的博客 759

spring boot 项目打成jar包并被其他项目引用

spring boot 项目打成jar包并被其他项目引用spring boot 项目打成jar包 spring boot 项目打成jar包 剔除要引入的springboot项目中不需要的文件:如Application和ApplicationTests等 2.打包 不能使用springboot项目自带的打包插件进行打包: <build> <plugins> <plugin> <groupId>org.springframe

那些年码的代码 6297

Spring Boot 入门:使用Maven插件将 Spring Boot 应用程序打成 jar 包运行

Spring Boot 入门:使用Maven插件把 Spring Boot 应用程序打成 jar 包运行 上一篇我们搭建了我们的第一个Spring Boot 应用程序,但是运行的方式是在IDEA中直接点击Run运行。 现在我们把 Spring Boot 应用程序打成 jar 包用java -jar运行。 在pom.xml中添加支持打jar包的代码和插件代码 <!--Spring Boot打...

无间行者 1434

论Maven(SpringBoot打成可执行jar包的那些坑、SpringBoot打war包)

一、概述Maven 1、Maven工程的约定目录 项目名(根目录)   - src         - main                   - java(主程序的java源码)    &nbs

cj1561435010的博客 711
上一篇: 前端 与 Android/iOS 交互
下一篇: BCompare4注册码
TOP__ONE
博客等级 码龄10年 74粉丝 117原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值