• springBoot-使用idea创建项目添加依赖并实现数据查询


    一、使用idea创建springBoot项目

     

    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.1.2</version>
    9. <relativePath/> <!-- lookup parent from repository -->
    10. </parent>
    11. <groupId>com.manage</groupId>
    12. <artifactId>inventory</artifactId>
    13. <version>0.0.1-SNAPSHOT</version>
    14. <packaging>war</packaging>
    15. <name>inventory</name>
    16. <description>inventory</description>
    17. <properties>
    18. <java.version>17</java.version>
    19. </properties>
    20. <dependencies>
    21. <!-- 核心依赖 -->
    22. <dependency>
    23. <groupId>org.springframework.boot</groupId>
    24. <artifactId>spring-boot-starter-web</artifactId>
    25. </dependency>
    26. <dependency>
    27. <groupId>org.springframework.boot</groupId>
    28. <artifactId>spring-boot-starter-tomcat</artifactId>
    29. <scope>provided</scope>
    30. </dependency>
    31. <dependency>
    32. <groupId>org.springframework.boot</groupId>
    33. <artifactId>spring-boot-starter-test</artifactId>
    34. <scope>test</scope>
    35. </dependency>
    36. <dependency>
    37. <groupId>org.springframework.boot</groupId>
    38. <artifactId>spring-boot-starter</artifactId>
    39. </dependency>
    40. <dependency>
    41. <groupId>org.springframework.boot</groupId>
    42. <artifactId>spring-boot-starter-logging</artifactId>
    43. </dependency>
    44. <!-- 可以实现热部署,在IDEA上实现热部署还需一些额外的配置,请查阅资料 -->
    45. <dependency>
    46. <groupId>org.springframework.boot</groupId>
    47. <artifactId>spring-boot-devtools</artifactId>
    48. <optional>true</optional>
    49. <scope>runtime</scope>
    50. </dependency>
    51. <!-- JDBC for mysql -->
    52. <dependency>
    53. <groupId>mysql</groupId>
    54. <artifactId>mysql-connector-java</artifactId>
    55. <version>6.0.6</version>
    56. <scope>runtime</scope>
    57. </dependency>
    58. <dependency>
    59. <groupId>org.springframework.boot</groupId>
    60. <artifactId>spring-boot-starter-test</artifactId>
    61. <scope>test</scope>
    62. </dependency>
    63. <!-- mybatis -->
    64. <!--mybatis-->
    65. <!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter -->
    66. <dependency>
    67. <groupId>org.mybatis.spring.boot</groupId>
    68. <artifactId>mybatis-spring-boot-starter</artifactId>
    69. <version>1.3.1</version>
    70. </dependency>
    71. <!--fastJson-->
    72. <dependency>
    73. <groupId>com.alibaba</groupId>
    74. <artifactId>fastjson</artifactId>
    75. <version>1.2.12</version>
    76. </dependency>
    77. <!--druid-->
    78. <dependency>
    79. <groupId>com.alibaba</groupId>
    80. <artifactId>druid</artifactId>
    81. <version>1.0.18</version>
    82. </dependency>
    83. <dependency>
    84. <groupId>org.mybatis</groupId>
    85. <artifactId>mybatis</artifactId>
    86. <version>3.4.1</version>
    87. </dependency>
    88. <!--thymeleaf 新的模板引擎,比jsp要出色-->
    89. <dependency>
    90. <groupId>org.springframework.boot</groupId>
    91. <artifactId>spring-boot-starter-thymeleaf</artifactId>
    92. </dependency>
    93. <!--jdbc-->
    94. <dependency>
    95. <groupId>org.springframework.boot</groupId>
    96. <artifactId>spring-boot-starter-jdbc</artifactId>
    97. </dependency>
    98. <!-- 分页插件 -->
    99. <dependency>
    100. <groupId>com.github.pagehelper</groupId>
    101. <artifactId>pagehelper-spring-boot-starter</artifactId>
    102. <version>1.2.12</version>
    103. </dependency>
    104. </dependencies>
    105. <build>
    106. <plugins>
    107. <plugin>
    108. <groupId>org.springframework.boot</groupId>
    109. <artifactId>spring-boot-maven-plugin</artifactId>
    110. </plugin>
    111. </plugins>
    112. </build>
    113. </project>

  • 相关阅读:
    模块一、任务一.数据分析概述
    opencv+tesseract完成验证码识别(识别率99.99%)
    WPF Prism框架学习
    程序员的土味情话
    H桥级联型五电平三相逆变器Simulink仿真模型
    手把手带你玩转Linux
    华为认证HCIA H12-811 Datacom数通考试真题题库【带答案刷题必过】【第一部分】
    雪花算法详解及源码分析
    MySql 数据库【表】
    element UI table横向树结合checkbox进行多选,实现各个节点的[全选,半选,不选]状态附带模拟数据
  • 原文地址:https://blog.csdn.net/u013952845/article/details/131901788