【SpringBoot学习二】springboot项目构建

本文档详细记录了使用SpringBoot2.0.1构建项目的过程,包括配置pom.xml,设定工程结构,利用Maven构建,创建启动类Application.java,并介绍了如何通过修改application.properties设置端口,启动和运行Spring Boot应用。
摘要由CSDN通过智能技术生成

上篇介绍了项目的开发环境的搭建,这篇开始记录我的springboot项目开发全过程。
应用到的主要的组件与框架:
1.框架:springboot2.0.1
2.数据库:mysql5.7
3.持久化:hibernate5
4.模板框架:freemarker
5.页面装饰器:sitemesh3
6.缓存:ehcache
7.日志:logback
8.服务器容器:tomcat8

一、构建项目

1.pom,里面好多前期不需要,但是后期都会用到的慢慢来

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0&quot;
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example</groupId>
    <artifactId>springboot-e</artifactId>
    <version>0.0.1</version>
    <packaging>war</packaging>

    <name>springboot-e</name>
    <description>springboot-e project for Spring Boot</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.1.RELEASE</version>
        <relativePath />
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependen
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值