解决阿里云信息jaxb-api包冲突

本文介绍如何在项目中正确配置阿里云SDK及JAXB相关依赖,包括aliyun-java-sdk-core、aliyun-java-sdk-dysmsapi等,确保短信服务API调用正常运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<!-- 阿里云信息 -->
		<dependency>
			<groupId>com.aliyun</groupId>
			<artifactId>aliyun-java-sdk-core</artifactId>
			<version>4.0.6</version> 
			<!-- 注:如提示报错,先升级基础包版,无法解决可联系技术支持 -->
		</dependency>
		<dependency>
			<groupId>com.aliyun</groupId>
			<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
			<version>1.1.0</version>
		</dependency>
		
		<dependency>
		    <groupId>javax.xml.bind</groupId>
		    <artifactId>jaxb-api</artifactId>
		    <version>2.2</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-core -->
		<dependency>
		    <groupId>com.sun.xml.bin
<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>3.1.3</version> </parent> <groupId>com.itheima</groupId> <artifactId>big-event</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>big-event</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <!--web依赖--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!--mybatis依赖--> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>3.0.0</version> </dependency> <!--mysql驱动依赖--> <dependency> <groupId>com.mysql</groupId> <artifactId>mysql-connector-j</artifactId> </dependency> <!--lombok依赖--> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </dependency> <!--validation依赖--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> </dependency> <!--java-jwt坐标--> <dependency> <groupId>com.auth0</groupId> <artifactId>java-jwt</artifactId> <version>4.4.0</version> </dependency> <!--单元测试的坐标--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> </dependency> <!--pageHelper坐标--> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.4.6</version> </dependency> <!--阿里云oss依赖坐标--> <dependency> <groupId>com.aliyun.oss</groupId> <artifactId>aliyun-sdk-oss</artifactId> <version>3.15.1</version> </dependency> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.3.1</version> </dependency> <dependency> <groupId>javax.activation</groupId> <artifactId>activation</artifactId> <version>1.1.1</version> </dependency> <!-- no more than 2.3.3--> <dependency> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-runtime</artifactId> <version>2.3.3</version> </dependency> <!--redis坐标--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> </dependencies> <build> <plugins> <!--打包插件--> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>3.1.3</version> </plugin> </plugins> </build> </project> 为什么无法适配jdk24
06-27
构建 失败 WebMvcConfiguration.java 程序包lombok.extern.slf4j不存在 程序包org.springframework.beans.factory.annotation不存在 程序包org.springframework.context.annotation不存在 程序包org.springframework.context.annotation不存在 程序包org.springframework.web.servlet.config.annotation不存在 程序包org.springframework.web.servlet.config.annotation不存在 程序包org.springframework.web.servlet.config.annotation不存在 程序包springfox.documentation.builders不存在 程序包springfox.documentation.builders不存在 程序包springfox.documentation.builders不存在 程序包springfox.documentation.service不存在 程序包springfox.documentation.spi不存在 程序包springfox.documentation.spring.web.plugins不存在 找不到符号 找不到符号 找不到符号 找不到符号 找不到符号 找不到符号 找不到符号 找不到符号 JwtTokenAdminInterceptor.java 程序包com.sky.constant不存在 程序包com.sky.properties不存在 程序包com.sky.utils不存在 程序包io.jsonwebtoken不存在 程序包lombok.extern.slf4j不存在 程序包org.springframework.beans.factory.annotation不存在 程序包org.springframework.stereotype不存在 程序包org.springframework.web.method不存在 程序包org.springframework.web.servlet不存在 程序包javax.servlet.http不存在 程序包javax.servlet.http不存在 找不到符号 找不到符号 找不到符号 找不到符号 找不到符号 找不到符号 找不到符号 EmployeeController.java 程序包com.sky.constant不存在 程序包com.sky.dto不存在 程序包com.sky.entity不存在 程序包com.sky.properties不存在 程序包com.sky.result不存在 程序包com.sky.utils不存在 程序包com.sky.vo不存在 程序包lombok.extern.slf4j不存在 程序包org.springframework.beans.factory.annotation不存在 程序包org.springframework.web.bind.annotation不存在 程序包org.springframework.web.bind.annotation不存在 程序包org.springframework.web.bind.annotation不存在 程序包org.springframework.web.bind.annotation不存在 找不到符号 找不到符号 找不到符号 找不到符号 找不到符号 找不到符号 找不到符号 找不到符号 找不到符号 找不到符号 EmployeeService.java 程序包com.sky.dto不存在 程序包com.sky.entity不存在 找不到符号 找不到符号 GlobalExceptionHandler.java 程序包com.sky.exception不存在 程序包com.sky.result不存在 程序包lombok.extern.slf4j不存在 程序包org.springframework.web.bind.annotation不存在 程序包org.springframework.web.bind.annotation不存在 找不到符号 找不到符号 找不到符号 找不到符号 EmployeeMapper.java 程序包com.sky.entity不存在 程序包org.apache.ibatis.annotations不存在 程序包org.apache.ibatis.annotations不存在 找不到符号 找不到符号 EmployeeServiceImpl.java SkyApplication.java <?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> <artifactId>spring-boot-starter-parent</artifactId> <groupId>org.springframework.boot</groupId> <version>2.7.3</version> </parent> <groupId>com.sky</groupId> <artifactId>sky-take-out</artifactId> <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> <modules> <module>sky-common</module> <module>sky-pojo</module> <module>sky-server</module> </modules> <properties> <mybatis.spring>2.2.0</mybatis.spring> <lombok>1.18.20</lombok> <fastjson>1.2.76</fastjson> <commons.lang>2.6</commons.lang> <druid>1.2.1</druid> <pagehelper>1.3.0</pagehelper> <aliyun.sdk.oss>3.10.2</aliyun.sdk.oss> <knife4j>3.0.2</knife4j> <aspectj>1.9.4</aspectj> <jjwt>0.9.1</jjwt> <jaxb-api>2.3.1</jaxb-api> <poi>3.16</poi> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>${mybatis.spring}</version> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${lombok}</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>${fastjson}</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>${commons.lang}</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>${druid}</version> </dependency> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>${pagehelper}</version> </dependency> <dependency> <groupId>com.github.xiaoymin</groupId> <artifactId>knife4j-spring-boot-starter</artifactId> <version>${knife4j}</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>${aspectj}</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>${aspectj}</version> </dependency> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt</artifactId> <version>${jjwt}</version> </dependency> <dependency> <groupId>com.aliyun.oss</groupId> <artifactId>aliyun-sdk-oss</artifactId> <version>${aliyun.sdk.oss}</version> </dependency> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>${jaxb-api}</version> </dependency> <!-- poi --> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>${poi}</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>${poi}</version> </dependency> <!--微信支付--> <dependency> <groupId>com.github.wechatpay-apiv3</groupId> <artifactId>wechatpay-apache-httpclient</artifactId> <version>0.4.8</version> </dependency> </dependencies> </dependencyManagement> </project>
最新发布
07-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

唐 城

小朋友,你是不是有很多问号?

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值