关于Java开发环境准备的问题集合
一、编译问题
1.Maven工程报错:No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format…
在Maven工程中,启动服务时报出如下异常:
No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize,
其原因是在配置tomcat插件时编译出现了问题。给出如下代码就会报错异常信息:
<build>
<!-- 配置插件 -->
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<!-- 门户服务端口号 -->
<port>8082</port>
<path>/</path>
</configuration>
</plugin>
</plugins>
</build>
解决方法:eclipse安装的maven插件是m2eclipse,在控制台使用命令mvn compile并未报错。需要修改pom.xml文件,在标签里面加 上compile即可。修改后的代码如下所示:
<build>
<defaultGoal>compile</defaultGoal>
<!-- 配置插件 -->
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<!-- 门户服务端口号 -->
<port>8082</port>
<path>/</path>
</configuration>
</plugin>
</plugins>
</build>
2.springboot + mybatis 自动生成相关实体映射 required a bean of type ‘xx.xx.xxMapper’ that could not be found
https://blog.csdn.net/qq_26173219/article/details/79250254
二、环境配置问题
1.在Eclipse里面使用git上传项目到码云
https://www.cnblogs.com/zfding/p/7667517.html