Spring-AI搭建企业专属知识库 一

环境介绍:Spring3.3.2 JDK 21

POM文件

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>
        <groupId>com.xmin.lecture</groupId>
        <artifactId>lecture-spring-ai</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>

    <artifactId>spring</artifactId>


    <repositories>
        <repository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>spring-snapshots</id>
            <name>Spring Snapshots</name>
            <url>https://repo.spring.io/snapshot</url>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>


    <dependencyManagement>

        <dependencies>
            <dependency>
                <groupId>org.springframework.ai</groupId>
                <artifactId>spring-ai-bom</artifactId>
                <version>1.0.0-SNAPSHOT</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${springboot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>


        </dependencies>


    </dependencyManagement>

    <dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.ai</groupId>
            <artifactId>spring-ai-moonshot-spring-boot-starter</artifactId>
        </dependency>


        <dependency>
            <groupId>org.springframework.ai</groupId>
            <artifactId>spring-ai-pgvector-store-spring-boot-starter</artifactId>
        </dependency>


    </dependencies>


    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${springboot.version}</version>
                <configuration>
                    <mainClass>com.xmin.lecture.Application</mainClass>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
相关推荐
甲维斯7 小时前
Kimi K3 修Bug,越修越多!
人工智能
Litluecat7 小时前
2026年7月20日科技热点新闻
人工智能·科技·新闻·每日·速览
达达尼昂7 小时前
AI 编程的工程化实践:Flutter AI Harness 的设计与落地
人工智能·后端·全栈
廋到被风吹走7 小时前
【AI】从“卖能力“到“卖信任“,合规与安全成为新战场
人工智能·安全
蓝速科技8 小时前
蓝速科技 3D 全息舱展览馆落地实测:降噪算力与成像质量深度评测
人工智能·科技·3d
小小测试开发8 小时前
PromptFoo 源码分析与工程实战:LLM 测试框架的架构与最佳实践
人工智能·架构
IT_陈寒8 小时前
React的useEffect依赖项把我坑惨了
前端·人工智能·后端
dozenyaoyida8 小时前
AI与大模型新闻日报 | 2026-07-22
人工智能·搜索引擎·新闻·gpt-5.6·claude fable5
GeekArch8 小时前
第28讲:避坑——AI堆栈分配错误、栈溢出BUG
c语言·人工智能·stm32·mcu·学习·bug
ShallWeL8 小时前
【机器学习】(23)—— 神经网络入门
人工智能·神经网络·机器学习