001补充
This commit is contained in:
parent
70b93b272b
commit
c43f52da30
111
weblog-springboot-001补充/pom.xml
Normal file
111
weblog-springboot-001补充/pom.xml
Normal file
@ -0,0 +1,111 @@
|
||||
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<!-- 将 Spring Boot 的版本号切换成 2.6 版本 -->
|
||||
<version>2.6.3</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<groupId>com.quanxiaoha</groupId>
|
||||
<artifactId>weblog-springboot</artifactId>
|
||||
<version>${revision}</version>
|
||||
<name>weblog-springboot</name>
|
||||
<!-- 项目描述 -->
|
||||
<description>前后端分离博客 Weblog By 犬小哈</description>
|
||||
|
||||
<!-- 多模块项目父工程打包模式必须指定为 pom -->
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<!-- 子模块管理 -->
|
||||
<modules>
|
||||
<!-- 入口模块 -->
|
||||
<module>weblog-web</module>
|
||||
<!-- 管理后台 -->
|
||||
<module>weblog-module-admin</module>
|
||||
<!-- 通用模块 -->
|
||||
<module>weblog-module-common</module>
|
||||
</modules>
|
||||
|
||||
|
||||
<!-- 版本号统一管理 -->
|
||||
<properties>
|
||||
<!-- 项目版本号 -->
|
||||
<revision>0.0.1-SNAPSHOT</revision>
|
||||
<java.version>1.8</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<!-- Maven 相关 -->
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
|
||||
<!-- 依赖包版本 -->
|
||||
<lombok.version>1.18.28</lombok.version>
|
||||
<guava.version>31.1-jre</guava.version>
|
||||
<commons-lang3.version>3.12.0</commons-lang3.version>
|
||||
|
||||
</properties>
|
||||
|
||||
<!-- 统一依赖管理 -->
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.quanxiaoha</groupId>
|
||||
<artifactId>weblog-module-admin</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.quanxiaoha</groupId>
|
||||
<artifactId>weblog-module-common</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 常用工具库 -->
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>${guava.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>${commons-lang3.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<!-- 统一插件管理 -->
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<!-- 使用阿里云的 Maven 仓库源,提升包下载速度 -->
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>aliyunmaven</id>
|
||||
<name>aliyun</name>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
||||
38
weblog-springboot-001补充/weblog-module-admin/pom.xml
Normal file
38
weblog-springboot-001补充/weblog-module-admin/pom.xml
Normal file
@ -0,0 +1,38 @@
|
||||
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<!-- 指定父项目为 weblog-springboot -->
|
||||
<parent>
|
||||
<groupId>com.quanxiaoha</groupId>
|
||||
<artifactId>weblog-springboot</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.quanxiaoha</groupId>
|
||||
<artifactId>weblog-module-admin</artifactId>
|
||||
<name>weblog-module-admin</name>
|
||||
<description>weblog-admin (负责管理后台相关功能)</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.quanxiaoha</groupId>
|
||||
<artifactId>weblog-module-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 免写冗余的 Java 样板式代码 -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- 单元测试 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
32
weblog-springboot-001补充/weblog-module-common/pom.xml
Normal file
32
weblog-springboot-001补充/weblog-module-common/pom.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.quanxiaoha</groupId>
|
||||
<artifactId>weblog-springboot</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.quanxiaoha</groupId>
|
||||
<artifactId>weblog-module-common</artifactId>
|
||||
<name>weblog-module-common</name>
|
||||
<description>weblog-module-common (此模块用于存放一些通用的功能)</description>
|
||||
|
||||
<dependencies>
|
||||
<!-- 免写冗余的 Java 样板式代码 -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- 单元测试 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
55
weblog-springboot-001补充/weblog-web/pom.xml
Normal file
55
weblog-springboot-001补充/weblog-web/pom.xml
Normal file
@ -0,0 +1,55 @@
|
||||
<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>
|
||||
<!-- 指定父项目为 weblog-springboot -->
|
||||
<parent>
|
||||
<groupId>com.quanxiaoha</groupId>
|
||||
<artifactId>weblog-springboot</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.quanxiaoha</groupId>
|
||||
<artifactId>weblog-web</artifactId>
|
||||
<name>weblog-web</name>
|
||||
<description>weblog-web (入口项目,负责博客前台展示相关功能,打包也放在这个模块负责)</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.quanxiaoha</groupId>
|
||||
<artifactId>weblog-module-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.quanxiaoha</groupId>
|
||||
<artifactId>weblog-module-admin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 依赖 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 免写冗余的 Java 样板式代码 -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- 单元测试 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@ -0,0 +1,13 @@
|
||||
package com.quanxiaoha.weblog.web;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class WeblogWebApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(WeblogWebApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.quanxiaoha.weblog.web;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
@Slf4j
|
||||
public class WeblogWebApplicationTests {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
// 编写单元测试
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user