初始化 infra 模块.

This commit is contained in:
lijiahang
2023-07-13 17:02:12 +08:00
parent e56ff794c3
commit bffec6baf5
6 changed files with 119 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-module-infra</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>orion-ops-module-infra-provider</artifactId>
<packaging>jar</packaging>
<description>项目基建模块 用户 菜单 日志等</description>
<url>https://github.com/lijiahangmax/orion-ops-pro</url>
<dependencies>
<dependency>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-common</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,62 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-module-infra</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>orion-ops-module-infra-service</artifactId>
<packaging>jar</packaging>
<description>项目基建模块 用户 菜单 日志等</description>
<url>https://github.com/lijiahangmax/orion-ops-pro</url>
<dependencies>
<dependency>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-common</artifactId>
</dependency>
<!-- infra provider -->
<dependency>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-module-infra-provider</artifactId>
<version>${revision}</version>
</dependency>
<!-- security -->
<dependency>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-spring-boot-starter-security</artifactId>
</dependency>
<!-- swagger -->
<dependency>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-spring-boot-starter-swagger</artifactId>
</dependency>
<!-- redis -->
<dependency>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-spring-boot-starter-redis</artifactId>
</dependency>
<!-- mybatis -->
<dependency>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-spring-boot-starter-mybatis</artifactId>
</dependency>
<!-- storage -->
<dependency>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-spring-boot-starter-storage</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,38 @@
package com.orion.ops.module.infra.framework.service.impl;
import com.orion.lang.utils.collect.Lists;
import com.orion.ops.framework.common.security.LoginUser;
import com.orion.ops.framework.security.core.service.SecurityFrameworkService;
import org.springframework.stereotype.Component;
/**
* TODO 依赖用户服务 现在默认实现
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/7/7 10:57
*/
@Component
public class EmptySecurityImpl implements SecurityFrameworkService {
@Override
public boolean hasPermission(String permission) {
return true;
}
@Override
public boolean hasRole(String role) {
return true;
}
@Override
public LoginUser getUserByToken(String token) {
LoginUser user = new LoginUser();
user.setId(123L);
user.setUsername("username");
user.setNickname("nickname");
user.setRoles(Lists.of("r1", "r2"));
return user;
}
}

View File

@@ -0,0 +1,23 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-pro</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>orion-ops-module-infra</artifactId>
<packaging>pom</packaging>
<description>项目基建模块 用户 菜单 日志等</description>
<url>https://github.com/lijiahangmax/orion-ops-pro</url>
<modules>
<module>orion-ops-module-infra-provider</module>
<module>orion-ops-module-infra-service</module>
</modules>
</project>