Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
datax-cloud
Overview
Overview
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
黄营
datax-cloud
Commits
a4dbed9b
Commit
a4dbed9b
authored
Oct 31, 2019
by
yuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目初始化
parent
0bcbbb22
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
658 additions
and
3 deletions
+658
-3
datax-service-email-dev.yml
...fig/src/main/resources/config/datax-service-email-dev.yml
+65
-0
datax-service-file-dev.yml
...nfig/src/main/resources/config/datax-service-file-dev.yml
+65
-0
pom.xml
datax-modules/email-service-parent/email-service-api/pom.xml
+32
-0
EmailEntity.java
...n/java/cn/datax/service/email/api/entity/EmailEntity.java
+37
-0
EmailServiceFeign.java
...a/cn/datax/service/email/api/feign/EmailServiceFeign.java
+16
-0
EmailServiceFeignFallbackFactory.java
...l/api/feign/factory/EmailServiceFeignFallbackFactory.java
+18
-0
EmailServiceFeignFallbackImpl.java
...ail/api/feign/fallback/EmailServiceFeignFallbackImpl.java
+22
-0
pom.xml
datax-modules/email-service-parent/email-service/pom.xml
+89
-0
DataxMailApplication.java
...ain/java/cn/datax/service/email/DataxMailApplication.java
+15
-0
EmailController.java
...va/cn/datax/service/email/controller/EmailController.java
+27
-0
MailMapper.java
...c/main/java/cn/datax/service/email/mapper/MailMapper.java
+7
-0
EmailService.java
...ain/java/cn/datax/service/email/service/EmailService.java
+7
-0
EmailServiceImpl.java
...cn/datax/service/email/service/impl/EmailServiceImpl.java
+52
-0
EmailUtil.java
...src/main/java/cn/datax/service/email/utils/EmailUtil.java
+49
-0
bootstrap.yml
...ice-parent/email-service/src/main/resources/bootstrap.yml
+30
-0
pom.xml
datax-modules/email-service-parent/pom.xml
+21
-0
pom.xml
datax-modules/file-service-parent/file-service-api/pom.xml
+9
-0
FileServerProperties.java
...n/datax/service/file/properties/FileServerProperties.java
+2
-1
pom.xml
datax-modules/pom.xml
+2
-0
pom.xml
...-modules/system-service-parent/system-service-api/pom.xml
+9
-0
pom.xml
datax-modules/system-service-parent/system-service/pom.xml
+5
-0
DataxCodeGenApplication.java
...n/java/cn/datax/tool/codegen/DataxCodeGenApplication.java
+1
-1
CodeGenerator.java
.../main/java/cn/datax/tool/codegen/utils/CodeGenerator.java
+1
-1
pom.xml
datax-tools/datax-tool-monitor/pom.xml
+38
-0
DataxMonitorApplication.java
...n/java/cn/datax/tool/monitor/DataxMonitorApplication.java
+17
-0
bootstrap.yml
...tools/datax-tool-monitor/src/main/resources/bootstrap.yml
+19
-0
pom.xml
datax-tools/pom.xml
+2
-0
pom.xml
pom.xml
+1
-0
No files found.
datax-config/src/main/resources/config/datax-service-email-dev.yml
0 → 100644
View file @
a4dbed9b
# 数据源配置
spring
:
datasource
:
dynamic
:
type
:
com.zaxxer.hikari.HikariDataSource
hikari
:
auto-commit
:
false
connection-timeout
:
30000
idle-timeout
:
25000
login-timeout
:
5
max-lifetime
:
30000
read-only
:
false
validation-timeout
:
3000
maximum-pool-size
:
15
minimum-idle
:
5
pool-name
:
DataxHikariCP
connection-test-query
:
SELECT 1 FROM DUAL
data-source-properties
:
cachePrepStmts
:
true
prepStmtCacheSize
:
250
prepStmtCacheSqlLimit
:
2048
useServerPrepStmts
:
true
useLocalSessionState
:
true
rewriteBatchedStatements
:
true
cacheResultSetMetadata
:
true
cacheServerConfiguration
:
true
elideSetAutoCommits
:
true
maintainTimeStats
:
false
primary
:
mysql
datasource
:
mysql
:
driver-class-name
:
com.p6spy.engine.spy.P6SpyDriver
url
:
jdbc:p6spy:mysql://127.0.0.1:3306/data_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
root
password
:
1234@abcd
mybatis-plus
:
mapper-locations
:
classpath*:mapper/*Mapper.xml
type-aliases-package
:
cn.datax.email.api.entity
global-config
:
db-config
:
id-type
:
ID_WORKER_STR
logic-delete-value
:
0
# 逻辑已删除值(默认为 1)
logic-not-delete-value
:
1
# 逻辑未删除值(默认为 0)
banner
:
false
configuration
:
map-underscore-to-camel-case
:
true
cache-enabled
:
false
call-setters-on-nulls
:
true
log-impl
:
org.apache.ibatis.logging.stdout.StdOutImpl
# spring security 配置
security
:
oauth2
:
client
:
access-token-uri
:
http://localhost:8612/auth/oauth/token
user-authorization-uri
:
http://localhost:8612/auth/oauth/authorize
client-id
:
datax
client-secret
:
123456
scope
:
all
resource
:
loadBalanced
:
true
token-info-uri
:
http://localhost:8612/auth/oauth/check_token
\ No newline at end of file
datax-config/src/main/resources/config/datax-service-file-dev.yml
0 → 100644
View file @
a4dbed9b
# 数据源配置
spring
:
datasource
:
dynamic
:
type
:
com.zaxxer.hikari.HikariDataSource
hikari
:
auto-commit
:
false
connection-timeout
:
30000
idle-timeout
:
25000
login-timeout
:
5
max-lifetime
:
30000
read-only
:
false
validation-timeout
:
3000
maximum-pool-size
:
15
minimum-idle
:
5
pool-name
:
DataxHikariCP
connection-test-query
:
SELECT 1 FROM DUAL
data-source-properties
:
cachePrepStmts
:
true
prepStmtCacheSize
:
250
prepStmtCacheSqlLimit
:
2048
useServerPrepStmts
:
true
useLocalSessionState
:
true
rewriteBatchedStatements
:
true
cacheResultSetMetadata
:
true
cacheServerConfiguration
:
true
elideSetAutoCommits
:
true
maintainTimeStats
:
false
primary
:
mysql
datasource
:
mysql
:
driver-class-name
:
com.p6spy.engine.spy.P6SpyDriver
url
:
jdbc:p6spy:mysql://127.0.0.1:3306/data_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
root
password
:
1234@abcd
mybatis-plus
:
mapper-locations
:
classpath*:mapper/*Mapper.xml
type-aliases-package
:
cn.datax.file.api.entity
global-config
:
db-config
:
id-type
:
ID_WORKER_STR
logic-delete-value
:
0
# 逻辑已删除值(默认为 1)
logic-not-delete-value
:
1
# 逻辑未删除值(默认为 0)
banner
:
false
configuration
:
map-underscore-to-camel-case
:
true
cache-enabled
:
false
call-setters-on-nulls
:
true
log-impl
:
org.apache.ibatis.logging.stdout.StdOutImpl
# spring security 配置
security
:
oauth2
:
client
:
access-token-uri
:
http://localhost:8612/auth/oauth/token
user-authorization-uri
:
http://localhost:8612/auth/oauth/authorize
client-id
:
datax
client-secret
:
123456
scope
:
all
resource
:
loadBalanced
:
true
token-info-uri
:
http://localhost:8612/auth/oauth/check_token
\ No newline at end of file
datax-modules/email-service-parent/email-service-api/pom.xml
0 → 100644
View file @
a4dbed9b
<?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>
email-service-parent
</artifactId>
<groupId>
cn.datax
</groupId>
<version>
1.0.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
email-service-api
</artifactId>
<dependencies>
<!--feign 依赖-->
<dependency>
<groupId>
io.github.openfeign
</groupId>
<artifactId>
feign-okhttp
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
</dependency>
<dependency>
<groupId>
cn.datax
</groupId>
<artifactId>
datax-common-core
</artifactId>
<version>
${app.version}
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
datax-modules/email-service-parent/email-service-api/src/main/java/cn/datax/service/email/api/entity/EmailEntity.java
0 → 100644
View file @
a4dbed9b
package
cn
.
datax
.
service
.
email
.
api
.
entity
;
import
cn.datax.common.base.BaseEntity
;
import
lombok.Data
;
import
java.io.File
;
import
java.util.List
;
@Data
public
class
EmailEntity
extends
BaseEntity
{
/**
* 标题
*/
private
String
subject
;
/**
* 内容
*/
private
String
text
;
/**
* 接收人
*/
private
List
<
String
>
tos
;
/**
* 抄送人
*/
private
List
<
String
>
ccs
;
/**
* 密送人
*/
private
List
<
String
>
bccs
;
/**
* 附件
*/
private
List
<
File
>
files
;
}
datax-modules/email-service-parent/email-service-api/src/main/java/cn/datax/service/email/api/feign/EmailServiceFeign.java
0 → 100644
View file @
a4dbed9b
package
cn
.
datax
.
service
.
email
.
api
.
feign
;
import
cn.datax.common.core.R
;
import
cn.datax.service.email.api.entity.EmailEntity
;
import
cn.datax.service.email.api.feign.factory.EmailServiceFeignFallbackFactory
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
@FeignClient
(
contextId
=
"emailServiceFeign"
,
value
=
"datax-service-email"
,
fallbackFactory
=
EmailServiceFeignFallbackFactory
.
class
)
public
interface
EmailServiceFeign
{
@PostMapping
(
"/mail"
)
R
sendMail
(
@RequestBody
EmailEntity
mail
);
}
datax-modules/email-service-parent/email-service-api/src/main/java/cn/datax/service/email/api/feign/factory/EmailServiceFeignFallbackFactory.java
0 → 100644
View file @
a4dbed9b
package
cn
.
datax
.
service
.
email
.
api
.
feign
.
factory
;
import
cn.datax.service.email.api.feign.EmailServiceFeign
;
import
cn.datax.service.email.api.feign.fallback.EmailServiceFeignFallbackImpl
;
import
feign.hystrix.FallbackFactory
;
import
org.springframework.stereotype.Component
;
@Component
public
class
EmailServiceFeignFallbackFactory
implements
FallbackFactory
<
EmailServiceFeign
>
{
@Override
public
EmailServiceFeign
create
(
Throwable
throwable
)
{
EmailServiceFeignFallbackImpl
emailServiceFeignFallbackImpl
=
new
EmailServiceFeignFallbackImpl
();
emailServiceFeignFallbackImpl
.
setCause
(
throwable
);
return
emailServiceFeignFallbackImpl
;
}
}
datax-modules/email-service-parent/email-service-api/src/main/java/cn/datax/service/email/api/feign/fallback/EmailServiceFeignFallbackImpl.java
0 → 100644
View file @
a4dbed9b
package
cn
.
datax
.
service
.
email
.
api
.
feign
.
fallback
;
import
cn.datax.common.core.R
;
import
cn.datax.service.email.api.entity.EmailEntity
;
import
cn.datax.service.email.api.feign.EmailServiceFeign
;
import
lombok.Setter
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
@Slf4j
@Component
public
class
EmailServiceFeignFallbackImpl
implements
EmailServiceFeign
{
@Setter
private
Throwable
cause
;
@Override
public
R
sendMail
(
EmailEntity
mail
)
{
log
.
error
(
"feign 发送邮件失败"
,
cause
);
return
null
;
}
}
datax-modules/email-service-parent/email-service/pom.xml
0 → 100644
View file @
a4dbed9b
<?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>
email-service-parent
</artifactId>
<groupId>
cn.datax
</groupId>
<version>
1.0.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
email-service
</artifactId>
<dependencies>
<!--配置中心客户端 -->
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-config
</artifactId>
</dependency>
<!--web 模块-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<!--mail 模块-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-mail
</artifactId>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<version>
${swagger2.version}
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<version>
${swagger2.version}
</version>
</dependency>
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
swagger-bootstrap-ui
</artifactId>
<version>
${swagger-bootstrap.version}
</version>
</dependency>
<dependency>
<groupId>
org.mapstruct
</groupId>
<artifactId>
mapstruct
</artifactId>
<version>
${mapstruct.version}
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.mapstruct
</groupId>
<artifactId>
mapstruct-processor
</artifactId>
<version>
${mapstruct.version}
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
cn.datax
</groupId>
<artifactId>
datax-common-mybatis
</artifactId>
<version>
${app.version}
</version>
</dependency>
<dependency>
<groupId>
cn.datax
</groupId>
<artifactId>
datax-common-security
</artifactId>
<version>
${app.version}
</version>
</dependency>
<dependency>
<groupId>
cn.datax
</groupId>
<artifactId>
datax-common-log
</artifactId>
<version>
${app.version}
</version>
</dependency>
<dependency>
<groupId>
cn.datax
</groupId>
<artifactId>
email-service-api
</artifactId>
<version>
${app.version}
</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
datax-modules/email-service-parent/email-service/src/main/java/cn/datax/service/email/DataxMailApplication.java
0 → 100644
View file @
a4dbed9b
package
cn
.
datax
.
service
.
email
;
import
cn.datax.common.log.annotation.EnableDataLog
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@EnableDataLog
@SpringBootApplication
public
class
DataxMailApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
DataxMailApplication
.
class
);
}
}
datax-modules/email-service-parent/email-service/src/main/java/cn/datax/service/email/controller/EmailController.java
0 → 100644
View file @
a4dbed9b
package
cn
.
datax
.
service
.
email
.
controller
;
import
cn.datax.common.core.R
;
import
cn.datax.common.log.annotation.LogAop
;
import
cn.datax.service.email.api.entity.EmailEntity
;
import
cn.datax.service.email.service.EmailService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/email"
)
public
class
EmailController
{
@Autowired
private
EmailService
emailService
;
@LogAop
(
module
=
"datax-service-email"
,
value
=
"发送邮件"
)
@PostMapping
public
R
sendMail
(
@RequestBody
EmailEntity
mail
)
{
emailService
.
sendEmail
(
mail
);
return
R
.
ok
();
}
}
datax-modules/email-service-parent/email-service/src/main/java/cn/datax/service/email/mapper/MailMapper.java
0 → 100644
View file @
a4dbed9b
package
cn
.
datax
.
service
.
email
.
mapper
;
import
cn.datax.common.base.BaseDao
;
import
cn.datax.service.email.api.entity.EmailEntity
;
public
interface
MailMapper
extends
BaseDao
<
EmailEntity
>
{
}
datax-modules/email-service-parent/email-service/src/main/java/cn/datax/service/email/service/EmailService.java
0 → 100644
View file @
a4dbed9b
package
cn
.
datax
.
service
.
email
.
service
;
import
cn.datax.service.email.api.entity.EmailEntity
;
public
interface
EmailService
{
void
sendEmail
(
EmailEntity
mail
);
}
datax-modules/email-service-parent/email-service/src/main/java/cn/datax/service/email/service/impl/EmailServiceImpl.java
0 → 100644
View file @
a4dbed9b
package
cn
.
datax
.
service
.
email
.
service
.
impl
;
import
cn.datax.service.email.api.entity.EmailEntity
;
import
cn.datax.service.email.service.EmailService
;
import
cn.datax.service.email.utils.EmailUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.mail.javamail.JavaMailSender
;
import
org.springframework.stereotype.Service
;
import
javax.mail.internet.AddressException
;
import
javax.mail.internet.InternetAddress
;
import
javax.mail.internet.MimeUtility
;
import
java.io.UnsupportedEncodingException
;
@Slf4j
@Service
public
class
EmailServiceImpl
implements
EmailService
{
@Value
(
"${spring.mail.from}"
)
private
String
fromNick
;
@Value
(
"${spring.mail.username}"
)
private
String
fromAddress
;
@Autowired
private
JavaMailSender
mailSender
;
@Override
public
void
sendEmail
(
EmailEntity
emailEntity
)
{
log
.
info
(
"实体类 {}"
,
emailEntity
);
InternetAddress
from
=
null
;
String
alias
=
null
;
try
{
alias
=
MimeUtility
.
encodeText
(
fromNick
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
try
{
from
=
new
InternetAddress
(
alias
+
" <"
+
fromAddress
+
">"
);
}
catch
(
AddressException
e
)
{
e
.
printStackTrace
();
}
EmailUtil
emailUtil
=
new
EmailUtil
(
from
,
mailSender
);
try
{
emailUtil
.
sendEmail
(
emailEntity
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
datax-modules/email-service-parent/email-service/src/main/java/cn/datax/service/email/utils/EmailUtil.java
0 → 100644
View file @
a4dbed9b
package
cn
.
datax
.
service
.
email
.
utils
;
import
cn.datax.service.email.api.entity.EmailEntity
;
import
cn.hutool.core.collection.CollUtil
;
import
org.springframework.mail.javamail.JavaMailSender
;
import
org.springframework.mail.javamail.MimeMessageHelper
;
import
javax.mail.internet.InternetAddress
;
import
javax.mail.internet.MimeMessage
;
import
java.io.File
;
import
java.util.List
;
public
class
EmailUtil
{
private
InternetAddress
from
;
private
JavaMailSender
mailSender
;
public
EmailUtil
(
InternetAddress
from
,
JavaMailSender
mailSender
)
{
this
.
from
=
from
;
this
.
mailSender
=
mailSender
;
}
public
void
sendEmail
(
EmailEntity
mailEntity
)
throws
Exception
{
MimeMessage
mimeMessage
=
mailSender
.
createMimeMessage
();
MimeMessageHelper
helper
=
new
MimeMessageHelper
(
mimeMessage
,
true
);
helper
.
setFrom
(
from
);
helper
.
setSubject
(
mailEntity
.
getSubject
());
helper
.
setText
(
mailEntity
.
getText
(),
true
);
List
<
String
>
tos
=
mailEntity
.
getTos
();
helper
.
setTo
((
String
[])
tos
.
toArray
(
new
String
[
tos
.
size
()]));
List
<
String
>
ccs
=
mailEntity
.
getCcs
();
if
(
CollUtil
.
isNotEmpty
(
ccs
)){
helper
.
setCc
((
String
[])
ccs
.
toArray
(
new
String
[
ccs
.
size
()]));
}
List
<
String
>
bccs
=
mailEntity
.
getBccs
();
if
(
CollUtil
.
isNotEmpty
(
bccs
)){
helper
.
setBcc
((
String
[])
bccs
.
toArray
(
new
String
[
bccs
.
size
()]));
}
List
<
File
>
files
=
mailEntity
.
getFiles
();
if
(
CollUtil
.
isNotEmpty
(
files
)){
for
(
int
i
=
0
;
i
<
files
.
size
();
i
++)
{
File
file
=
files
.
get
(
i
);
helper
.
addAttachment
(
file
.
getName
(),
file
);
}
}
mailSender
.
send
(
mimeMessage
);
}
}
datax-modules/email-service-parent/email-service/src/main/resources/bootstrap.yml
0 → 100644
View file @
a4dbed9b
server
:
port
:
8812
spring
:
application
:
name
:
datax-service-email
profiles
:
active
:
dev
cloud
:
config
:
fail-fast
:
true
uri
:
http://localhost:8611
name
:
${spring.application.name}
profile
:
${spring.profiles.active}
discovery
:
enabled
:
true
service-id
:
datax-config
# 注册中心配置
eureka
:
instance
:
lease-renewal-interval-in-seconds
:
20
client
:
register-with-eureka
:
true
fetch-registry
:
true
instance-info-replication-interval-seconds
:
30
registry-fetch-interval-seconds
:
3
service-url
:
defaultZone
:
http://localhost:8610/eureka
\ No newline at end of file
datax-modules/email-service-parent/pom.xml
0 → 100644
View file @
a4dbed9b
<?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>
datax-modules
</artifactId>
<groupId>
cn.datax
</groupId>
<version>
1.0.0
</version>
</parent>
<packaging>
pom
</packaging>
<modules>
<module>
email-service
</module>
<module>
email-service-api
</module>
</modules>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
email-service-parent
</artifactId>
</project>
\ No newline at end of file
datax-modules/file-service-parent/file-service-api/pom.xml
View file @
a4dbed9b
...
...
@@ -12,6 +12,15 @@
<artifactId>
file-service-api
</artifactId>
<dependencies>
<!--feign 依赖-->
<dependency>
<groupId>
io.github.openfeign
</groupId>
<artifactId>
feign-okhttp
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
</dependency>
<dependency>
<groupId>
cn.datax
</groupId>
<artifactId>
datax-common-core
</artifactId>
...
...
datax-modules/file-service-parent/file-service/src/main/java/cn/datax/service/file/properties/FileServerProperties.java
View file @
a4dbed9b
...
...
@@ -7,10 +7,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties
(
prefix
=
"data.file-server"
)
public
class
FileServerProperties
{
/**
* 为以下
3
个值,指定不同的自动化配置
* 为以下
4
个值,指定不同的自动化配置
* qiniu:七牛oss
* aliyun:阿里云oss
* fastdfs:本地部署的fastDFS
* local:本地盘符部署
*/
private
String
type
;
...
...
datax-modules/pom.xml
View file @
a4dbed9b
...
...
@@ -15,6 +15,7 @@
<modules>
<module>
system-service-parent
</module>
<module>
file-service-parent
</module>
<module>
email-service-parent
</module>
</modules>
</project>
\ No newline at end of file
datax-modules/system-service-parent/system-service-api/pom.xml
View file @
a4dbed9b
...
...
@@ -12,6 +12,15 @@
<artifactId>
system-service-api
</artifactId>
<dependencies>
<!--feign 依赖-->
<dependency>
<groupId>
io.github.openfeign
</groupId>
<artifactId>
feign-okhttp
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
</dependency>
<dependency>
<groupId>
cn.datax
</groupId>
<artifactId>
datax-common-core
</artifactId>
...
...
datax-modules/system-service-parent/system-service/pom.xml
View file @
a4dbed9b
...
...
@@ -66,6 +66,11 @@
</dependency>
<dependency>
<groupId>
cn.datax
</groupId>
<artifactId>
datax-common-log
</artifactId>
<version>
${app.version}
</version>
</dependency>
<dependency>
<groupId>
cn.datax
</groupId>
<artifactId>
system-service-api
</artifactId>
<version>
${app.version}
</version>
</dependency>
...
...
datax-tools/datax-tool-codegen/src/main/java/cn/datax/
service
/codegen/DataxCodeGenApplication.java
→
datax-tools/datax-tool-codegen/src/main/java/cn/datax/
tool
/codegen/DataxCodeGenApplication.java
View file @
a4dbed9b
package
cn
.
datax
.
service
.
codegen
;
package
cn
.
datax
.
tool
.
codegen
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
...
...
datax-tools/datax-tool-codegen/src/main/java/cn/datax/
service
/codegen/utils/CodeGenerator.java
→
datax-tools/datax-tool-codegen/src/main/java/cn/datax/
tool
/codegen/utils/CodeGenerator.java
View file @
a4dbed9b
package
cn
.
datax
.
service
.
codegen
.
utils
;
package
cn
.
datax
.
tool
.
codegen
.
utils
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.core.toolkit.StringPool
;
...
...
datax-tools/datax-tool-monitor/pom.xml
0 → 100644
View file @
a4dbed9b
<?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>
datax-tools
</artifactId>
<groupId>
cn.datax
</groupId>
<version>
1.0.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
datax-tool-monitor
</artifactId>
<dependencies>
<!--监控服务端 -->
<dependency>
<groupId>
de.codecentric
</groupId>
<artifactId>
spring-boot-admin-starter-server
</artifactId>
<version>
${spring-boot-admin.version}
</version>
</dependency>
<!--web 模块 -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
datax-tools/datax-tool-monitor/src/main/java/cn/datax/tool/monitor/DataxMonitorApplication.java
0 → 100644
View file @
a4dbed9b
package
cn
.
datax
.
tool
.
monitor
;
import
de.codecentric.boot.admin.server.config.EnableAdminServer
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
@EnableDiscoveryClient
@EnableAdminServer
@SpringBootApplication
public
class
DataxMonitorApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
DataxMonitorApplication
.
class
,
args
);
}
}
datax-tools/datax-tool-monitor/src/main/resources/bootstrap.yml
0 → 100644
View file @
a4dbed9b
server
:
port
:
8614
spring
:
application
:
name
:
datax-tool-monitor
# 注册中心配置
eureka
:
instance
:
lease-renewal-interval-in-seconds
:
20
client
:
register-with-eureka
:
true
fetch-registry
:
true
instance-info-replication-interval-seconds
:
30
registry-fetch-interval-seconds
:
3
service-url
:
defaultZone
:
http://localhost:8610/eureka
\ No newline at end of file
datax-tools/pom.xml
View file @
a4dbed9b
...
...
@@ -14,6 +14,7 @@
<modules>
<module>
datax-tool-codegen
</module>
<module>
datax-tool-monitor
</module>
</modules>
</project>
\ No newline at end of file
pom.xml
View file @
a4dbed9b
...
...
@@ -22,6 +22,7 @@
<app.version>
1.0.0
</app.version>
<spring-boot.version>
2.1.9.RELEASE
</spring-boot.version>
<spring-cloud.version>
Greenwich.SR3
</spring-cloud.version>
<spring-boot-admin.version>
2.1.6
</spring-boot-admin.version>
<fastjson.version>
1.2.62
</fastjson.version>
<hutool.version>
5.0.3
</hutool.version>
...
...
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