feat: 基本框架搭建.

This commit is contained in:
2025-08-08 15:45:29 +08:00
parent 601c38ed33
commit 6b6fbcd139
6 changed files with 141 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
package com.serliunx.blog;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* 启动类
*
* @author <a href="mailto:root@serliunx.com">SerLiunx</a>
* @since 2025/8/8
*/
@EnableScheduling
@SpringBootApplication
@EnableTransactionManagement
@MapperScan("com.serliunx.blog.mapper")
public class PersonalBlogApplication {
public static void main(String[] args) {
SpringApplication.run(PersonalBlogApplication.class, args);
}
}

View File

@@ -0,0 +1,7 @@
server:
port: 18080
spring:
datasource:
url: jdbc:mysql://localhost:3306/personal_blog?autoReconnect=true&characterEncoding=utf8
username: root
# password: password, # 密码不建议写在配置文件中, 建议利用Idea中的配置覆盖, 如果是其他IDE请自行斟酌

View File

View File

@@ -0,0 +1,12 @@
spring:
profiles:
active: dev
banner:
location: banner/banner.txt
charset: UTF-8
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
mybatis-plus:
global-config:
banner: false

View File

@@ -0,0 +1,7 @@
_________ .____ .__
/ _____/ ___________| | |__|__ __ ____ ___ ___
\_____ \_/ __ \_ __ \ | | | | \/ \\ \/ /
/ \ ___/| | \/ |___| | | / | \> <
/_______ /\___ >__| |_______ \__|____/|___| /__/\_ \
\/ \/ \/ \/ \/ , PersonalBlog - 1.0.0, Supported by Spring Boot v${spring-boot.version}