feat: 项目初始化
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
@ -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<>();
|
||||
}
|
||||
}
|
||||
21
dolphin-compose/src/main/resources/application.yml
Normal file
21
dolphin-compose/src/main/resources/application.yml
Normal 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user