Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
eb414b8d
Commit
eb414b8d
authored
Jul 23, 2025
by
hcing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jyjc):jyjc集成seata
parent
02e2e5da
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
129 additions
and
8 deletions
+129
-8
pom.xml
amos-boot-biz-common/pom.xml
+5
-0
XidFeignConfiguration.java
...oin/amos/boot/biz/common/feign/XidFeignConfiguration.java
+1
-1
TaskV2FeignService.java
...oin/amos/boot/module/jg/biz/feign/TaskV2FeignService.java
+6
-2
WorkFlowFeignService.java
...n/amos/boot/module/jg/biz/feign/WorkFlowFeignService.java
+1
-1
pom.xml
...s/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/pom.xml
+5
-0
AmosJyjcApplication.java
...z/src/main/java/com/yeejoin/amos/AmosJyjcApplication.java
+2
-1
DataSourceConfiguration.java
.../boot/module/jyjc/biz/config/DataSourceConfiguration.java
+67
-0
HikariDataSourceProperties.java
...ot/module/jyjc/biz/config/HikariDataSourceProperties.java
+36
-0
WorkflowFeignClient.java
.../amos/boot/module/jyjc/biz/feign/WorkflowFeignClient.java
+2
-3
application-dev.properties
...le-jyjc-biz/src/main/resources/application-dev.properties
+4
-0
No files found.
amos-boot-biz-common/pom.xml
View file @
eb414b8d
...
@@ -142,6 +142,11 @@
...
@@ -142,6 +142,11 @@
<groupId>
com.yeejoin
</groupId>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-feign-systemctl
</artifactId>
<artifactId>
amos-feign-systemctl
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
io.seata
</groupId>
<artifactId>
seata-spring-boot-starter
</artifactId>
<version>
1.8.0
</version>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
amos-boot-
system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/config
/XidFeignConfiguration.java
→
amos-boot-
biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/feign
/XidFeignConfiguration.java
View file @
eb414b8d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
config
;
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
feign
;
import
feign.RequestInterceptor
;
import
feign.RequestInterceptor
;
import
feign.RequestTemplate
;
import
feign.RequestTemplate
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/feign/TaskV2FeignService.java
View file @
eb414b8d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
feign
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
feign
;
import
com.yeejoin.amos.boot.
module.jg.biz.config
.XidFeignConfiguration
;
import
com.yeejoin.amos.boot.
biz.common.feign
.XidFeignConfiguration
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/feign/WorkFlowFeignService.java
View file @
eb414b8d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
feign
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
feign
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.
module.jg.biz.config
.XidFeignConfiguration
;
import
com.yeejoin.amos.boot.
biz.common.feign
.XidFeignConfiguration
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.workflow.model.*
;
import
com.yeejoin.amos.feign.workflow.model.*
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/pom.xml
View file @
eb414b8d
...
@@ -34,6 +34,11 @@
...
@@ -34,6 +34,11 @@
<groupId>
net.javacrumbs.shedlock
</groupId>
<groupId>
net.javacrumbs.shedlock
</groupId>
<artifactId>
shedlock-provider-redis-spring
</artifactId>
<artifactId>
shedlock-provider-redis-spring
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
io.seata
</groupId>
<artifactId>
seata-spring-boot-starter
</artifactId>
<version>
1.8.0
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<plugins>
<plugins>
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/AmosJyjcApplication.java
View file @
eb414b8d
...
@@ -18,6 +18,7 @@ import org.springframework.core.env.Environment;
...
@@ -18,6 +18,7 @@ import org.springframework.core.env.Environment;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc
;
import
java.net.InetAddress
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.net.UnknownHostException
;
...
@@ -28,7 +29,6 @@ import java.net.UnknownHostException;
...
@@ -28,7 +29,6 @@ import java.net.UnknownHostException;
*
*
* @author DELL
* @author DELL
*/
*/
@SpringBootApplication
@EnableTransactionManagement
@EnableTransactionManagement
@EnableConfigurationProperties
@EnableConfigurationProperties
@ServletComponentScan
@ServletComponentScan
...
@@ -42,6 +42,7 @@ import java.net.UnknownHostException;
...
@@ -42,6 +42,7 @@ import java.net.UnknownHostException;
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
"com.yeejoin.amos.boot.module.**.api.mapper"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
"com.yeejoin.amos.boot.module.**.api.mapper"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
@ComponentScan
(
basePackages
=
{
"org.typroject"
,
"com.yeejoin.amos"
})
@ComponentScan
(
basePackages
=
{
"org.typroject"
,
"com.yeejoin.amos"
})
@SpringBootApplication
(
exclude
=
{
org
.
springframework
.
boot
.
autoconfigure
.
jdbc
.
DataSourceAutoConfiguration
.
class
})
public
class
AmosJyjcApplication
{
public
class
AmosJyjcApplication
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AmosJyjcApplication
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AmosJyjcApplication
.
class
);
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/config/DataSourceConfiguration.java
0 → 100644
View file @
eb414b8d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
config
;
import
com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties
;
import
com.baomidou.mybatisplus.core.config.GlobalConfig
;
import
com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
;
import
com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean
;
import
com.yeejoin.amos.boot.biz.config.MetaHandler
;
import
com.yeejoin.amos.boot.biz.config.MybatisSqlInjector
;
import
com.zaxxer.hikari.HikariDataSource
;
import
io.seata.rm.datasource.DataSourceProxy
;
import
org.apache.ibatis.plugin.Interceptor
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceProperties
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.io.support.PathMatchingResourcePatternResolver
;
import
org.springframework.core.io.support.ResourcePatternResolver
;
import
javax.sql.DataSource
;
/**
* 数据源代理
*
* @author LiuLin
*/
@Configuration
public
class
DataSourceConfiguration
{
@Bean
(
"dataSource"
)
public
DataSourceProxy
dataSourceProxy
(
HikariDataSourceProperties
hikariDataSourceProperties
,
DataSourceProperties
dataSourceProperties
)
{
HikariDataSource
dataSource
=
dataSourceProperties
.
initializeDataSourceBuilder
().
type
(
HikariDataSource
.
class
).
build
();
dataSource
.
setMaximumPoolSize
(
hikariDataSourceProperties
.
getMaximumPoolSize
());
dataSource
.
setMinimumIdle
(
hikariDataSourceProperties
.
getMinimumIdle
());
dataSource
.
setMaxLifetime
(
hikariDataSourceProperties
.
getMaxLifetime
());
dataSource
.
setPoolName
(
hikariDataSourceProperties
.
getPoolName
());
dataSource
.
setConnectionTestQuery
(
hikariDataSourceProperties
.
getConnectionTestQuery
());
dataSource
.
setIdleTimeout
(
hikariDataSourceProperties
.
getIdleTimeout
());
dataSource
.
setConnectionTimeout
(
hikariDataSourceProperties
.
getConnectionTimeout
());
dataSource
.
setIdleTimeout
(
hikariDataSourceProperties
.
getIdleTimeout
());
dataSource
.
setConnectionInitSql
(
hikariDataSourceProperties
.
getConnectionInitSql
());
return
new
DataSourceProxy
(
dataSource
);
}
@Bean
(
name
=
"sqlSessionFactory"
)
@Autowired
public
SqlSessionFactory
sqlSessionFactoryBean
(
DataSource
dataSourceProxy
,
PaginationInterceptor
paginationInterceptor
,
MetaHandler
metaHandler
,
MybatisPlusProperties
mybatisPlusProperties
)
throws
Exception
{
MybatisSqlSessionFactoryBean
bean
=
new
MybatisSqlSessionFactoryBean
();
bean
.
setDataSource
(
dataSourceProxy
);
ResourcePatternResolver
resolver
=
new
PathMatchingResourcePatternResolver
();
bean
.
setMapperLocations
(
resolver
.
getResources
(
"classpath*:mapper/*.xml"
));
bean
.
setConfigurationProperties
(
mybatisPlusProperties
.
getConfigurationProperties
());
GlobalConfig
globalConfig
=
new
GlobalConfig
();
globalConfig
.
setSqlInjector
(
new
MybatisSqlInjector
());
globalConfig
.
setMetaObjectHandler
(
metaHandler
);
bean
.
setGlobalConfig
(
globalConfig
);
Interceptor
[]
plugins
=
{
paginationInterceptor
};
bean
.
setPlugins
(
plugins
);
return
bean
.
getObject
();
}
@Bean
public
MetaHandler
metaHandler
()
{
return
new
MetaHandler
();
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/config/HikariDataSourceProperties.java
0 → 100644
View file @
eb414b8d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
config
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.stereotype.Component
;
/**
* @author shg
*/
@Component
@ConfigurationProperties
(
prefix
=
"spring.datasource.hikari"
)
@Data
public
class
HikariDataSourceProperties
{
private
int
maximumPoolSize
;
private
int
minimumIdle
;
private
boolean
autoCommit
;
private
long
idleTimeout
;
private
String
poolName
;
private
long
maxLifetime
;
private
long
connectionTimeout
;
private
String
connectionTestQuery
;
private
long
validationTimeout
;
private
String
connectionInitSql
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/feign/WorkflowFeignClient.java
View file @
eb414b8d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
feign
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
feign
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.feign.
MultipartSupportConfig
;
import
com.yeejoin.amos.boot.biz.common.feign.
XidFeignConfiguration
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Map
;
import
java.util.Map
;
@FeignClient
(
contextId
=
"jyjc"
,
name
=
"${workflow.feign.name:AMOS-API-WORKFLOW}"
,
path
=
"workflow"
,
configuration
=
{
MultipartSupportConfig
.
class
})
@FeignClient
(
contextId
=
"jyjc"
,
name
=
"${workflow.feign.name:AMOS-API-WORKFLOW}"
,
path
=
"workflow"
,
configuration
=
{
XidFeignConfiguration
.
class
})
public
interface
WorkflowFeignClient
{
public
interface
WorkflowFeignClient
{
/***
/***
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/resources/application-dev.properties
View file @
eb414b8d
...
@@ -47,6 +47,10 @@ spring.elasticsearch.rest.uris=http://172.16.10.243:9200
...
@@ -47,6 +47,10 @@ spring.elasticsearch.rest.uris=http://172.16.10.243:9200
elasticsearch.username
=
elastic
elasticsearch.username
=
elastic
elasticsearch.password
=
a123456
elasticsearch.password
=
a123456
#Seata Config
seata.tx-service-group
=
tzs-seata
seata.service.grouplist.tzs-seata
=
172.16.10.243:8091
#检验检测流程KEY
#检验检测流程KEY
process-definition-key.jyjc.openapplication
=
inspectionBusinessOpened
process-definition-key.jyjc.openapplication
=
inspectionBusinessOpened
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment