parent
e20c9316f1
commit
1a331c7c27
@ -0,0 +1,38 @@
|
|||||||
|
package org.opsli.common.constants;
|
||||||
|
|
||||||
|
import cn.hutool.setting.dialect.Props;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: opsli-boot
|
||||||
|
* @BelongsPackage: org.opsli.common.constants
|
||||||
|
* @Author: Parker
|
||||||
|
* @CreateTime: 2020-09-18 18:46
|
||||||
|
* @Description: MyBatis 常量
|
||||||
|
*/
|
||||||
|
public final class MyBatisConstants {
|
||||||
|
|
||||||
|
private static final Props prop = Props.getProp("application.yaml");
|
||||||
|
|
||||||
|
/** 逻辑删除值 */
|
||||||
|
public static final char LOGIC_DELETE_VALUE =
|
||||||
|
prop.getChar("mybatis-plus.global-config.db-config.logic-delete-value",'1');
|
||||||
|
/** 逻辑不删除值 */
|
||||||
|
public static final char LOGIC_NOT_DELETE_VALUE =
|
||||||
|
prop.getChar("mybatis-plus.global-config.db-config.logic-not-delete-value",'0');
|
||||||
|
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
public static final String FIELD_CREATE_BY = "createBy";
|
||||||
|
/** 更新时间 */
|
||||||
|
public static final String FIELD_CREATE_TIME = "createTime";
|
||||||
|
/** 更新人 */
|
||||||
|
public static final String FIELD_UPDATE_BY = "updateBy";
|
||||||
|
/** 更新时间 */
|
||||||
|
public static final String FIELD_UPDATE_TIME = "updateTime";
|
||||||
|
/** 逻辑删除 */
|
||||||
|
public static final String FIELD_DELETE_LOGIC = "deleted";
|
||||||
|
/** 乐观锁 */
|
||||||
|
public static final String FIELD_OPTIMISTIC_LOCK = "version";
|
||||||
|
|
||||||
|
private MyBatisConstants(){}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
<?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>
|
||||||
|
<artifactId>opsli-boot-parent</artifactId>
|
||||||
|
<groupId>org.opsliframework.boot</groupId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>opsli-base-support</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>opsli-common</module>
|
||||||
|
<module>opsli-core</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
</project>
|
@ -1,27 +0,0 @@
|
|||||||
package org.opsli.core.conf;
|
|
||||||
|
|
||||||
import org.opsli.common.annotation.ApiRestController;
|
|
||||||
import org.opsli.core.prop.ApiPathProperties;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
|
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 配置统一的后台接口访问路径的前缀
|
|
||||||
* @author C西
|
|
||||||
*/
|
|
||||||
@Configuration
|
|
||||||
public class SpringWebMvcConfig implements WebMvcConfigurer {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ApiPathProperties apiPathProperties;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void configurePathMatch(PathMatchConfigurer configurer) {
|
|
||||||
configurer
|
|
||||||
.addPathPrefix(apiPathProperties.getGlobalPrefix(),c -> c.isAnnotationPresent(ApiRestController.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in new issue