spring-boot 的一个 helloworld
前言
此系列博客是个人在学习springBoot的学习笔记,算是一个记录吧,一方面记录学习的内容,一方面记录学习中犯下的错误。学习springBoot选择的是GitHub上一个比较著名的项目,链接如下https://github.com/xkcoding/spring-boot-demo.git。这是一个从易到难的项目,目标:完成本地实现。技术差,文笔差,学习能力差,啥都差,欢迎指正,拒绝喷人。
一、项目理解
大致看了下,是个多模块项目,idea中完成。预计
1.新建一个多模块项目。
2.填充父级pom文件
3.新建helloworld子模块,
4.填充子级pom文件
5.编程,
6.测试
二、实现步骤
1.新建项目
1.
2.
3.新建子模块
4.父级pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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.xkcoding</groupId>
<artifactId>spring-boot-learning-demo</artifactId>
<version>1.0.0-SNAPSHOT</version>
<!-- 子模块-->
<modules>
<module>spring-boot-demo-helloworld</module>
<!-- 以后才会用先注释掉-->
<!--<module>spring-boot-demo-properties</module>
<module>spring-boot-demo-actuator</module>
<module>spring-boot-demo-admin</module>
<module>spring-boot-demo-logback</module>
<module>spring-boot-demo-log-aop</module>
<module>spring-boot-demo-exception-handler</module>
<module>spring-boot-demo-template-freemarker</module>
<module>spring-boot-demo-template-thymeleaf</module>
<module>spring-boot-demo-template-beetl</module>
<module>spring-boot-demo-template-enjoy</module>
<module>spring-boot-demo-orm-jdbctemplate</module>
<module>spring-boot-demo-orm-jpa</module>
<module>spr