feat: 项目初始化

This commit is contained in:
2025-11-28 17:35:39 +08:00
parent 3ea0202709
commit 32fba5f65d
41 changed files with 1305 additions and 0 deletions

View File

@ -0,0 +1,12 @@
package day.gitlab.dolphin;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DolphinApplication {
public static void main(String[] args) {
SpringApplication.run(DolphinApplication.class, args);
}
}

View File

@ -0,0 +1,26 @@
package day.gitlab.dolphin.authorize;
import day.gitlab.dolphin.common.security.AuthenticationProvider;
import day.gitlab.dolphin.common.security.UserPrincipal;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
@Component
public class DolphinAuthenticationProvider implements AuthenticationProvider {
@Override
public UserPrincipal getUserPrincipal(String userId) {
UserPrincipal userPrincipal = new UserPrincipal();
userPrincipal.setId(userId);
userPrincipal.setUsername(userId);
userPrincipal.setNickname(userId);
return userPrincipal;
}
@Override
public List<String> getUserAuthorities(String userId) {
return new ArrayList<>();
}
}

View File

@ -0,0 +1,21 @@
server:
port: 8080
servlet:
context-path: /
spring:
application:
name: dolphin-compose
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://110.42.60.129:10002/postgres
username: postgres
password: postgres
data:
redis:
host: 110.42.60.129
port: 10001
database: 0
password: 123456