# xbd-boot
**Repository Path**: xbd521/xbd-boot
## Basic Information
- **Project Name**: xbd-boot
- **Description**: 基于spring boot的二次封装框架,封装了一些常用的框架的自动化配置
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2019-01-30
- **Last Updated**: 2022-05-25
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# xbd-boot
基于spring boot的二次封装框架,封装了一些常用的框架的自动化配置
## 与SpringBoot版本关系
总体原则,同步更新,与SpringBoot版本保持一致
xbd-boot |
spring-boot |
开发状态 |
1.0.x |
1.0.x |
放弃 |
1.1.x |
1.1.x |
放弃 |
1.2.x |
1.2.x |
放弃 |
1.3.x |
1.3.x |
放弃 |
1.4.x |
1.4.x |
放弃 |
1.5.x |
1.5.x |
开发中 |
2.0.x |
2.0.x |
开发中 |
2.1.x |
2.1.x |
开发中 |
## 与Xbd Framework版本关系
从Spring Framework 4.0开始,之前的版本不在处理
xbd-boot |
xbd-framework |
开发状态 |
1.0.x |
4.0.3 |
放弃 |
1.1.x |
4.0.x |
放弃 |
1.2.x |
4.1.x |
放弃 |
1.3.x |
1.2.x |
放弃 |
1.4.x |
4.3.x |
放弃 |
1.5.x |
4.3.x |
规划中 |
2.0.x |
5.0.x |
开发中 |
2.1.x |
5.1.x |
规划中 |
## 起步配置
```xml
org.xbdframework.boot
xbd-boot-starter-parent
revision
```
## xbd-boot-starter
起步Starter
```xml
org.xbdframework.boot
xbd-boot-starter
```
### 事务配置
#### 系统定义事务拦截路径
TransactionPointcutCustomizer
```java
@Bean
public TransactionPointcutCustomizer pointcutCustomizer() {
return (pointcut) -> { pointcut.setExpression("execution(* org.xbdframework..service..impl.*.*(..))") };
}
```
#### 系统定义拦截方法
##### 更新事务
* save
* delete
* update
* create
* exec
##### 只读事务
* get
* select
* query
* find
* list
* count
* is
#### 事务个性化配置
TransactionPointcutCustomizer
TransactionNameMatchCustomizer
TransactionMethodMapCustomizer
#### 特殊事务配置
TransactionMethodMapCustomizer
## xbd-boot-starter-activemq
ActiveMQ Starter
```xml
org.xbdframework.boot
xbd-boot-starter-activemq
```
## xbd-boot-starter-amqp
RabbitMQ Starter
```xml
org.xbdframework.boot
xbd-boot-starter-amqp
```
## xbd-boot-starter-enjoy
enjoy模板引擎Starter
```xml
org.xbdframework.boot
xbd-boot-starter-enjoy
```
### xbd.enjoy
配置项 |
说明 |
默认值 |
devMode |
开发模式 |
false |
prefix |
模板前缀 |
无 |
suffix |
模板后缀 |
.html |
contentType |
contentType |
text/html |
templatePath |
模板路径 |
classpath:/templates/ |
checkTemplateLocation |
模板路径检查 |
true |
exposeRequestAttributes |
|
false |
allowRequestOverride |
|
false |
exposeSessionAttributes |
|
false |
allowSessionOverride |
|
false |
exposeSpringMacroHelpers |
|
false |
sessionInView |
|
false |
createSession |
|
false |
## xbd-boot-starter-jdbc
Jdbc Starter
```xml
org.xbdframework.boot
xbd-boot-starter-jdbc
```
### xbd.dao
配置项 |
说明 |
默认值 |
dbType |
数据库类型 |
MYSQL |
showSql |
是否显示sql |
true |
## xbd-boot-starter-log4j2
log4j2 Starter
```xml
org.xbdframework.boot
xbd-boot-starter-log4j2
```
提供4种日志配置
* log4j2/log4j2-spring.xml
* log4j2/log4j2-spring-dev.xml
* log4j2/log4j2-spring-test.xml
* log4j2/log4j2-spring-prod.xml
```yaml
logging:
config: classpath:log4j2/log4j2-spring-dev.xml
path: d:\logs
```
log4j2-spring.xml
```xml
${sys:LOG_PATH}
```
log4j2-spring-dev.xml
```xml
${sys:LOG_PATH}
```
log4j2-spring-test.xml
```xml
${sys:LOG_PATH}
```
log4j2-spring-prod.xml
```xml
${sys:LOG_PATH}
```
### quartz Starter
```xml
org.xbdframework.boot
xbd-boot-starter-quartz
```
### xbd.quartz
配置项 |
说明 |
默认值 |
dataSourceType |
数据源类型 |
SYSTEM |
configLocation |
配置文件路径 |
无 |
schedulerName |
调度器名称 |
无 |
applicationContextSchedulerContextKey |
spring上下文key |
applicationContext |
useTaskExecutor |
是否使用异步执行器 |
false |
overwriteExistingJobs |
是否覆盖存在的任务 |
true |
autoStartup |
是否自动启动 |
true |
startupDelay |
延迟启动时间 |
5 |
## xbd-boot-starter-web
web工程Starter
```xml
org.xbdframework.boot
xbd-boot-starter-web
```