1. 卸载了eclipse ,结果连带卸载了java JDK ; 因为没有意识到所以第一次编译报错
2. run configure不会写,最后网络上查到在run 里输入:spring-boot:run ,普通的maven 工程,run里写:clean package
3. 报错:org.yaml.snakeyaml.reader.ReaderException: special characters are not allowed,网络上查原因,大概是因为引用了jdbc 的类,但是没有指定data source, 所以需要在application.properties 指定data source 。
此配置为文件有两种格式,yml 和properties, 语法结构不一样。
4. 报错“Error resolving template [Hello World!]”,看网络,需要用@RestController; 接着报错 找不到“RestController", 于是查网络,需要import org.springframework.web.bind.annotation.RestController;
最后,总算把spring boot的hello world 运行出来了。