feat: 基本框架搭建.
This commit is contained in:
23
src/main/java/com/serliunx/blog/PersonalBlogApplication.java
Normal file
23
src/main/java/com/serliunx/blog/PersonalBlogApplication.java
Normal 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);
|
||||
}
|
||||
}
|
||||
7
src/main/resources/application-dev.yml
Normal file
7
src/main/resources/application-dev.yml
Normal 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请自行斟酌
|
||||
0
src/main/resources/application-local.yml
Normal file
0
src/main/resources/application-local.yml
Normal file
12
src/main/resources/application.yml
Normal file
12
src/main/resources/application.yml
Normal 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
|
||||
7
src/main/resources/banner/banner.txt
Normal file
7
src/main/resources/banner/banner.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
_________ .____ .__
|
||||
/ _____/ ___________| | |__|__ __ ____ ___ ___
|
||||
\_____ \_/ __ \_ __ \ | | | | \/ \\ \/ /
|
||||
/ \ ___/| | \/ |___| | | / | \> <
|
||||
/_______ /\___ >__| |_______ \__|____/|___| /__/\_ \
|
||||
\/ \/ \/ \/ \/ , PersonalBlog - 1.0.0, Supported by Spring Boot v${spring-boot.version}
|
||||
Reference in New Issue
Block a user