pom.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  5. http://maven.apache.org/xsd/maven-4.0.0.xsd">
  6. <modelVersion>4.0.0</modelVersion>
  7. <parent>
  8. <groupId>org.springframework.boot</groupId>
  9. <artifactId>spring-boot-starter-parent</artifactId>
  10. <version>3.2.0</version>
  11. <relativePath/>
  12. </parent>
  13. <groupId>com.emoon</groupId>
  14. <artifactId>lab-report-interpret</artifactId>
  15. <version>1.0.0</version>
  16. <name>Lab Report Interpretation System</name>
  17. <description>甘肃省中医院检验报告解读智能体</description>
  18. <properties>
  19. <java.version>17</java.version>
  20. <langchain4j.version>0.36.2</langchain4j.version>
  21. </properties>
  22. <dependencies>
  23. <!-- Spring Boot Web Starter -->
  24. <dependency>
  25. <groupId>org.springframework.boot</groupId>
  26. <artifactId>spring-boot-starter-web</artifactId>
  27. </dependency>
  28. <!-- LangChain4J 核心 -->
  29. <dependency>
  30. <groupId>dev.langchain4j</groupId>
  31. <artifactId>langchain4j</artifactId>
  32. <version>${langchain4j.version}</version>
  33. </dependency>
  34. <!-- LangChain4J OpenAI兼容接口(用于调用百炼) -->
  35. <dependency>
  36. <groupId>dev.langchain4j</groupId>
  37. <artifactId>langchain4j-open-ai</artifactId>
  38. <version>${langchain4j.version}</version>
  39. </dependency>
  40. <!-- Hutool 工具类 -->
  41. <dependency>
  42. <groupId>cn.hutool</groupId>
  43. <artifactId>hutool-all</artifactId>
  44. <version>5.8.25</version>
  45. </dependency>
  46. <!-- Lombok -->
  47. <dependency>
  48. <groupId>org.projectlombok</groupId>
  49. <artifactId>lombok</artifactId>
  50. <optional>true</optional>
  51. </dependency>
  52. <!-- Spring Boot Configuration Processor -->
  53. <dependency>
  54. <groupId>org.springframework.boot</groupId>
  55. <artifactId>spring-boot-configuration-processor</artifactId>
  56. <optional>true</optional>
  57. </dependency>
  58. <!-- Spring Boot Test -->
  59. <dependency>
  60. <groupId>org.springframework.boot</groupId>
  61. <artifactId>spring-boot-starter-test</artifactId>
  62. <scope>test</scope>
  63. </dependency>
  64. </dependencies>
  65. <build>
  66. <plugins>
  67. <plugin>
  68. <groupId>org.springframework.boot</groupId>
  69. <artifactId>spring-boot-maven-plugin</artifactId>
  70. <configuration>
  71. <excludes>
  72. <exclude>
  73. <groupId>org.projectlombok</groupId>
  74. <artifactId>lombok</artifactId>
  75. </exclude>
  76. </excludes>
  77. </configuration>
  78. </plugin>
  79. <!-- 前端构建插件:自动安装npm依赖并构建 -->
  80. <plugin>
  81. <groupId>com.github.eirslett</groupId>
  82. <artifactId>frontend-maven-plugin</artifactId>
  83. <version>1.15.0</version>
  84. <configuration>
  85. <workingDirectory>${project.basedir}/src/main/resources/frontend</workingDirectory>
  86. <installDirectory>${project.build.directory}</installDirectory>
  87. </configuration>
  88. <executions>
  89. <!-- 安装Node.js和npm -->
  90. <execution>
  91. <id>install node and npm</id>
  92. <goals>
  93. <goal>install-node-and-npm</goal>
  94. </goals>
  95. <configuration>
  96. <nodeVersion>v20.11.0</nodeVersion>
  97. <npmVersion>10.2.4</npmVersion>
  98. </configuration>
  99. </execution>
  100. <!-- 安装npm依赖 -->
  101. <execution>
  102. <id>npm install</id>
  103. <goals>
  104. <goal>npm</goal>
  105. </goals>
  106. <configuration>
  107. <arguments>install</arguments>
  108. </configuration>
  109. </execution>
  110. <!-- 构建前端 -->
  111. <execution>
  112. <id>npm run build</id>
  113. <goals>
  114. <goal>npm</goal>
  115. </goals>
  116. <configuration>
  117. <arguments>run build</arguments>
  118. </configuration>
  119. <phase>generate-resources</phase>
  120. </execution>
  121. </executions>
  122. </plugin>
  123. <!-- 复制前端构建产物到static目录 -->
  124. <plugin>
  125. <groupId>org.apache.maven.plugins</groupId>
  126. <artifactId>maven-resources-plugin</artifactId>
  127. <version>3.3.1</version>
  128. <executions>
  129. <execution>
  130. <id>copy-frontend</id>
  131. <phase>process-resources</phase>
  132. <goals>
  133. <goal>copy-resources</goal>
  134. </goals>
  135. <configuration>
  136. <outputDirectory>${project.build.directory}/classes/static</outputDirectory>
  137. <resources>
  138. <resource>
  139. <directory>${project.basedir}/src/main/resources/frontend/dist</directory>
  140. <includes>
  141. <include>**/*</include>
  142. </includes>
  143. </resource>
  144. </resources>
  145. </configuration>
  146. </execution>
  147. </executions>
  148. </plugin>
  149. </plugins>
  150. </build>
  151. </project>