asp 该网站正在进行维护.,工商网查询官网,电商营销推广方案,wordpress 评论 邮件Spring AI 1.0.0-M6 入门一、存储库二、依赖管理完整maven 入门
Spring 是JAVA中我们经常使用的框架之一#xff0c;Spring AI不断的发展迭代目前已经到M6版本据说上半年会出一个稳定版本。
本节提供了如何开始使用Spring AI的M6。 一、存储库
1.0 M6 -添加Spring存储库 需… Spring AI 1.0.0-M6 入门一、存储库二、依赖管理完整maven 入门
Spring 是JAVA中我们经常使用的框架之一Spring AI不断的发展迭代目前已经到M6版本据说上半年会出一个稳定版本。
本节提供了如何开始使用Spring AI的M6。 一、存储库
1.0 M6 -添加Spring存储库 需要将Spring里程碑和快照存储库添加到构建系统中。如果您更喜欢手动添加依赖项片段请按照以下部分中的说明操作。 要使用Milestone和Snapshot版本您需要在构建文件中添加对Spring Milestone和/或Snapshot存储库的引用。 将以下存储库定义添加到您的Maven构建文件
repositoriesrepositoryidspring-milestones/idnameSpring Milestones/nameurlhttps://repo.spring.io/milestone/urlsnapshotsenabledfalse/enabled/snapshots/repositoryrepositoryidspring-snapshots/idnameSpring Snapshots/nameurlhttps://repo.spring.io/snapshot/urlreleasesenabledfalse/enabled/releases/repository
/repositories二、依赖管理
Spring AI Bill of Materials (BOM) 声明了Spring AI给定版本使用的所有依赖项的推荐版本。 使用应用程序构建脚本中的BOM无需您自己指定和维护依赖项版本。 相反您使用的BOM表版本决定了所使用的依赖关系版本。 它还确保您在默认情况下使用依赖项的受支持和测试版本除非您选择覆盖它们。
将BOM表添加到项目中 dependencyManagementdependenciesdependencygroupIdorg.springframework.ai/groupIdartifactIdspring-ai-bom/artifactIdversion1.0.0-M6/versiontypepom/typescopeimport/scope/dependency/dependencies/dependencyManagement完整maven
?xml version1.0 encodingUTF-8?
project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersionparentgroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-parent/artifactIdversion3.4.3/versionrelativePath/ !-- lookup parent from repository --/parentgroupIdcom.qijc/groupIdartifactIdai-springboot-starting/artifactIdversion0.0.1-SNAPSHOT/versionnameai-springboot-starting/namedescriptionai-springboot-starting/descriptionpropertiesjava.version17/java.versionspring-ai.version1.0.0-M6/spring-ai.version/propertiesrepositoriesrepositoryidspring-milestones/idnameSpring Milestones/nameurlhttps://repo.spring.io/milestone/urlsnapshotsenabledfalse/enabled/snapshots/repositoryrepositoryidspring-snapshots/idnameSpring Snapshots/nameurlhttps://repo.spring.io/snapshot/urlreleasesenabledfalse/enabled/releases/repository/repositoriesdependenciesdependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-web/artifactId/dependencydependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-test/artifactIdscopetest/scope/dependency/dependenciesdependencyManagementdependenciesdependencygroupIdorg.springframework.ai/groupIdartifactIdspring-ai-bom/artifactIdversion${spring-ai.version}/versiontypepom/typescopeimport/scope/dependency/dependencies/dependencyManagementbuildpluginsplugingroupIdorg.springframework.boot/groupIdartifactIdspring-boot-maven-plugin/artifactId/plugin/plugins/build/project