一、spring boot与spring mvc的区别是什么?
https://www.zhihu.com/question/64671972
二、搭建一个Springboot项目
1、https://www.cnblogs.com/pengyan-9826/p/8093099.html
2、如果出现Springboot的版本报错,原因是原因是pom.xml里面配的Springboot版本找不到,需要重新配Maven的setting.xml里的镜像仓库。
在仓库里看一下有哪些Springboot版本,在pom.xml里面换一个可以用的版本。
右键->Maven->Reimport。
点击启动类运行即可。
3、项目结构
User.java
package com.example.demo.bean;
public class User {
String name;
String password;
public void setUsername(String name){
this.name = name;
}
public void setPassword(String password){
this.password = password;
}
public void printUser(){
System.out.println(this.name);
System.out.println(this.password);
}
public String getName(