Spring-boot-demo学习记录(一)-spring-boot 的一个 helloworld

这篇博客记录了作者学习Spring Boot的过程,通过创建一个多模块项目,逐步完成了一个简单的Hello World应用。从新建项目、配置pom文件,到编写代码和测试,详细介绍了每个步骤。最后提到访问应用的URL需要注意context-path属性。
摘要由CSDN通过智能技术生成

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值