maven打包所有依赖
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compile.source>1.8</maven.compile.source>
<maven.compile.target>1.8</maven.compile.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>${maven.compile.source}</source>
<target>${maven.compile.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<!--<manifest>-->
<!--<mainClass>com.quan.simple.IncFrame</mainClass>-->
<!--</manifest>-->
<manifestEntries>
<Class-Path>.</Class-Path>
</manifestEntries>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
如何让引入自己sdk的spring扫描sdk下的类
新建配置类(@Import注解可以加载指定类至spring容器中)
import com.xxx.sso.aop.SsoCheckAspect;
import org.springframework.context.annotation.Import;
/**
* 自动配置类
*
* @author ccyy
*/
@Import({SsoCheckAspect.class})
public class SsoConfiguration {
}
新建如下目录以及文件
文章来源:https://www.toymoban.com/news/detail-506525.html
文章来源地址https://www.toymoban.com/news/detail-506525.html
到了这里,关于maven打包所有依赖,对外提供sdk.jar的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!