SpringBooot-基础<2>-POM.xml配置
2024-10-19 16:25:01
SpringBooot-基础<2>-POM.xml配置
项目创建完成后,需要配置pom.xml文件。
pom.xml里面的配置,按需进行添加,这里提供一份参考,后面做笔记会都用到。
<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>
<groupId>com.gongziyuan</groupId>
<artifactId>core-users</artifactId>
<version>0.0.1-SNAPSHOT</version> <parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.8.RELEASE</version>
<relativePath />
</parent> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties> <dependencies>
<!-- SPRING BOOT WEB -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency> <!-- SPRING BOOT AOP -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency> <!-- FREEMARKER框架 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency> <!-- 数据库 -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency> <dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency> <dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.5</version>
</dependency> <!-- Swagger -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.7.0</version>
</dependency> <!-- page分页 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.3</version>
</dependency> <dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.58</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.8</version>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
</dependencies> </project>
新见的工程pom.xml里面添加上述文件后,会有红点报错。如下:
解决方法:
更新一下项目即可:
选中项目,鼠标右键:maven -> Update Project... -> 点击ok
选择需要更新的项目,然后点击ok
更新后,红点报错消失:
最新文章
- ASP.NET Identity V2
- 代码规范、代码复审、PSP
- JS获取屏幕高度
- Linux下创建ftp用户并锁定根目录
- android 检测ListView滚动到的位置
- [Unity3D]Unity3D游戏开发之使用EasyTouch虚拟摇杆控制人物移动
- CentOS7--DNS处理模块DnsPython的简单使用
- MVC 如何在一个同步方法(非async)方法中等待async方法
- Java异常处理-----java异常体系
- Ubuntu16.04更新源
- Python爬虫之多线程下载豆瓣Top250电影图片
- 解决Delphi 2010启动时出现cannot create xxxx\EditorLineEnds.ttr问题
- Javascript的V8引擎研究
- 6款国内、国外开源PHP轻论坛CMS程序
- iOS设计模式:简单工厂模式
- spring boot2 基于百度云apiface实现人脸检测与认证1
- Manacher算法——求最长回文子串
- “全栈2019”Java第四十七章:继承与方法
- leetcode——Lowest Common Ancestor of a Binary Tree
- C#中ref和out的作用和区别
热门文章
- Nginx 和 Gunicorn 部署 Django项目
- tip:删除数组中的undefined
- swoole是如何实现任务定时自动化调度的?
- Java-slf4j:sfl4j
- [原创]mysql 5.6安装配置,主从分离,读写分离简单教程
- Linux常见问题解答--如何修复“tar:Exiting with failure status due to previous errors”
- 对于CDH LZO的安装
- Errors were encountered while processing: mysql-server-5.5
- Python开发第三方必备工具
- CSS3 进阶