当前位置:   article > 正文

Could not find artifact org.springframework.boot:spring-boot-starter-parent

could not find artifact org.springframework.boot:spring-boot-starter-parent:

项目一直用的好好,突然出这spring-boot-starter-parent 这个找不到了,通过这几天的改动,发现修改过maven的setting.xml ,由于添加了其他的仓库地址,,把仓库地址修改好,重新Reload project 之后就没问题了,下面是我的setting.xml配置

下面是一个基础Springboot 配置信息,可以满足正常小项目开发

  1. <mirror>
  2. <id>nexus-aliyun</id>
  3. <mirrorOf>central</mirrorOf>
  4. <name>Nexus aliyun</name>
  5. <url>https://maven.aliyun.com/nexus/content/groups/public</url>
  6. </mirror>
  7. <mirror>
  8. <id>jboss-public-repository-group</id>
  9. <mirrorOf>central</mirrorOf>
  10. <name>JBoss Public Repository Group</name>
  11. <url>http://repository.jboss.org/nexus/content/groups/public</url>
  12. </mirror>
  1. <id>jdk-19</id>
  2. <activation>
  3. <activeByDefault>true</activeByDefault>
  4. <jdk>19</jdk>
  5. </activation>
  6. <properties>
  7. <maven.compiler.source>19</maven.compiler.source>
  8. <maven.compiler.target>19</maven.compiler.target>
  9. <maven.compiler.compilerVersion>19</maven.compiler.compilerVersion>
  10. </properties>
  11. </profile>

pom.xml 配置,这个一基础的配置,只引入springboot ,数据库驱动,前端框架layui ,thymeleaf 模板引擎

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <parent>
  6. <groupId>org.springframework.boot</groupId>
  7. <artifactId>spring-boot-starter-parent</artifactId>
  8. <version>3.0.4</version>
  9. <relativePath/> <!-- lookup parent from repository -->
  10. </parent>
  11. <groupId>com.jm</groupId>
  12. <artifactId>first</artifactId>
  13. <version>0.0.1-SNAPSHOT</version>
  14. <name>first</name>
  15. <description>Demo project for Spring Boot</description>
  16. <properties>
  17. <java.version>19</java.version>
  18. </properties>
  19. <dependencies>
  20. <dependency>
  21. <groupId>org.springframework.boot</groupId>
  22. <artifactId>spring-boot-starter-web</artifactId>
  23. </dependency>
  24. <dependency>
  25. <groupId>org.projectlombok</groupId>
  26. <artifactId>lombok</artifactId>
  27. <optional>true</optional>
  28. </dependency>
  29. <dependency>
  30. <groupId>org.springframework.boot</groupId>
  31. <artifactId>spring-boot-starter-test</artifactId>
  32. <scope>test</scope>
  33. </dependency>
  34. <!--引入aop包-->
  35. <dependency>
  36. <groupId>org.springframework.boot</groupId>
  37. <artifactId>spring-boot-starter-aop</artifactId>
  38. </dependency>
  39. <dependency>
  40. <groupId>org.mybatis.spring.boot</groupId>
  41. <artifactId>mybatis-spring-boot-starter</artifactId>
  42. <version>3.0.1</version>
  43. </dependency>
  44. <dependency>
  45. <groupId>mysql</groupId>
  46. <artifactId>mysql-connector-java</artifactId>
  47. <version>8.0.20</version>
  48. </dependency>
  49. <dependency>
  50. <groupId>org.springframework.boot</groupId>
  51. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  52. </dependency>
  53. <dependency>
  54. <groupId>org.webjars</groupId>
  55. <artifactId>webjars-locator</artifactId>
  56. <version>0.45</version>
  57. </dependency>
  58. <dependency>
  59. <groupId>org.webjars</groupId>
  60. <artifactId>jquery</artifactId>
  61. <version>3.5.1</version>
  62. </dependency>
  63. <dependency>
  64. <groupId>org.webjars</groupId>
  65. <artifactId>layui</artifactId>
  66. <version>2.5.7</version>
  67. </dependency>
  68. </dependencies>
  69. <build>
  70. <plugins>
  71. <plugin>
  72. <groupId>org.springframework.boot</groupId>
  73. <artifactId>spring-boot-maven-plugin</artifactId>
  74. <configuration>
  75. <excludes>
  76. <exclude>
  77. <groupId>org.projectlombok</groupId>
  78. <artifactId>lombok</artifactId>
  79. </exclude>
  80. </excludes>
  81. </configuration>
  82. </plugin>
  83. </plugins>
  84. </build>
  85. </project>

appliaction.yml

  1. server:
  2. port:80
  3. spring:
  4. datasource:
  5. username: root
  6. password: 123456
  7. url: jdbc:mysql://localhost:3306/goods?userUnicode=true&characterEncoding=utf-8&serverTimezone=UTC
  8. driver-class-name: com.mysql.jc.Driver
  9. #com.mysql.jdbc.Driver
  10. thymeleaf:
  11. cache: false
  12. encoding: UTF-8
  13. mode: HTMLapp
  14. prefix: classpath:/templates/
  15. suffix: .html
  16. mybatis:
  17. mapper-locations: classpath*:mapper/*.xml
  18. #type-aliases-package: com.jm.first.mapper
  19. configuration:
  20. log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #用于控制台打印sql语句

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/575096
推荐阅读
相关标签
  

闽ICP备14008679号