Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VieoAITaskProducerService
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
VideoAIService
VieoAITaskProducerService
Commits
4be1946a
Commit
4be1946a
authored
Oct 08, 2021
by
wangjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉不用的jar
parent
efa10bcb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
128 additions
and
327 deletions
+128
-327
pom.xml
pom.xml
+4
-69
src/main/java/com/cx/cn/cxquartz/config/CacheConfig.java
src/main/java/com/cx/cn/cxquartz/config/CacheConfig.java
+109
-0
src/main/java/com/cx/cn/cxquartz/config/RedisConfig.java
src/main/java/com/cx/cn/cxquartz/config/RedisConfig.java
+0
-120
src/main/java/com/cx/cn/cxquartz/job/WebSocket.java
src/main/java/com/cx/cn/cxquartz/job/WebSocket.java
+0
-110
src/main/java/com/cx/cn/cxquartz/service/quartz/impl/QuartzServiceImpl.java
...cx/cn/cxquartz/service/quartz/impl/QuartzServiceImpl.java
+1
-6
src/main/resources/application-local.yml
src/main/resources/application-local.yml
+14
-8
src/test/java/com/quartz/cn/com/cx/cn/cxquartz/CXQuartzApplicationTests.java
...uartz/cn/com/cx/cn/cxquartz/CXQuartzApplicationTests.java
+0
-14
No files found.
pom.xml
View file @
4be1946a
...
@@ -8,8 +8,8 @@
...
@@ -8,8 +8,8 @@
<relativePath/>
<!-- lookup parent from repository -->
<relativePath/>
<!-- lookup parent from repository -->
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.
quartz
.cn
</groupId>
<groupId>
com.
task
.cn
</groupId>
<artifactId>
VideoofCultural
</artifactId>
<artifactId>
TaskDispatch
</artifactId>
<version>
1.0
</version>
<version>
1.0
</version>
<packaging>
jar
</packaging>
<packaging>
jar
</packaging>
<description></description>
<description></description>
...
@@ -27,11 +27,6 @@
...
@@ -27,11 +27,6 @@
<artifactId>
spring-boot-starter-web
</artifactId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<!--mybatis-->
<!--mybatis-->
<dependency>
<dependency>
...
@@ -52,36 +47,6 @@
...
@@ -52,36 +47,6 @@
<artifactId>
mysql-connector-java
</artifactId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-thymeleaf
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
<version>
3.6
</version>
</dependency>
<dependency>
<groupId>
net.sf.json-lib
</groupId>
<artifactId>
json-lib
</artifactId>
<version>
2.4
</version>
<classifier>
jdk15
</classifier>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi
</artifactId>
<version>
3.15-beta2
</version>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
<artifactId>
spring-boot-starter-aop
</artifactId>
...
@@ -98,13 +63,6 @@
...
@@ -98,13 +63,6 @@
<groupId>
org.apache.commons
</groupId>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
<artifactId>
commons-lang3
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.12
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<dependency>
<groupId>
com.google.code.gson
</groupId>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
<artifactId>
gson
</artifactId>
...
@@ -131,31 +89,13 @@
...
@@ -131,31 +89,13 @@
<artifactId>
commons-net
</artifactId>
<artifactId>
commons-net
</artifactId>
<version>
3.6
</version>
<version>
3.6
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.java-websocket
</groupId>
<artifactId>
Java-WebSocket
</artifactId>
<version>
1.3.8
</version>
</dependency>
<!-- redis -->
<!-- redis -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
</dependency>
<!--kafka依赖-->
<dependency>
<groupId>
org.springframework.kafka
</groupId>
<artifactId>
spring-kafka
</artifactId>
</dependency>
<!-- HttpClient依赖 -->
<dependency>
<groupId>
commons-httpclient
</groupId>
<artifactId>
commons-httpclient
</artifactId>
<version>
3.1
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-mail
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
ch.qos.logback
</groupId>
<groupId>
ch.qos.logback
</groupId>
<artifactId>
logback-classic
</artifactId>
<artifactId>
logback-classic
</artifactId>
...
@@ -174,11 +114,6 @@
...
@@ -174,11 +114,6 @@
<version>
1.7.25
</version>
<version>
1.7.25
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-amqp
</artifactId>
</dependency>
</dependencies>
</dependencies>
...
...
src/main/java/com/cx/cn/cxquartz/config/CacheConfig.java
0 → 100644
View file @
4be1946a
package
com
.
cx
.
cn
.
cxquartz
.
config
;
import
com.fasterxml.jackson.annotation.JsonAutoDetect
;
import
com.fasterxml.jackson.annotation.PropertyAccessor
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.data.redis.connection.RedisConnectionFactory
;
import
org.springframework.data.redis.core.*
;
import
org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer
;
import
org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer
;
import
org.springframework.data.redis.serializer.StringRedisSerializer
;
@Configuration
public
class
CacheConfig
{
@Bean
public
RedisTemplate
<
String
,
Object
>
empRedisTemplate
(
RedisConnectionFactory
redisConnectionFactory
)
{
RedisTemplate
<
String
,
Object
>
template
=
new
RedisTemplate
<
String
,
Object
>();
template
.
setConnectionFactory
(
redisConnectionFactory
);
template
.
setKeySerializer
(
new
StringRedisSerializer
());
template
.
setDefaultSerializer
(
new
GenericJackson2JsonRedisSerializer
());
return
template
;
}
@Bean
public
RedisTemplate
<
String
,
Object
>
redisTemplate
(
RedisConnectionFactory
factory
)
{
RedisTemplate
<
String
,
Object
>
template
=
new
RedisTemplate
<>();
// 配置连接工厂
template
.
setConnectionFactory
(
factory
);
//使用Jackson2JsonRedisSerializer来序列化和反序列化redis的value值(默认使用JDK的序列化方式)
Jackson2JsonRedisSerializer
jacksonSeial
=
new
Jackson2JsonRedisSerializer
(
Object
.
class
);
ObjectMapper
om
=
new
ObjectMapper
();
// 指定要序列化的域,field,get和set,以及修饰符范围,ANY是都有包括private和public
om
.
setVisibility
(
PropertyAccessor
.
ALL
,
JsonAutoDetect
.
Visibility
.
ANY
);
// 指定序列化输入的类型,类必须是非final修饰的,final修饰的类,比如String,Integer等会跑出异常
om
.
enableDefaultTyping
(
ObjectMapper
.
DefaultTyping
.
NON_FINAL
);
jacksonSeial
.
setObjectMapper
(
om
);
// 值采用json序列化
template
.
setValueSerializer
(
jacksonSeial
);
//使用StringRedisSerializer来序列化和反序列化redis的key值
template
.
setKeySerializer
(
new
StringRedisSerializer
());
// 设置hash key 和value序列化模式
template
.
setHashKeySerializer
(
new
StringRedisSerializer
());
template
.
setHashValueSerializer
(
jacksonSeial
);
template
.
afterPropertiesSet
();
return
template
;
}
/**
* 对hash类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public
HashOperations
<
String
,
String
,
Object
>
hashOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
return
redisTemplate
.
opsForHash
();
}
/**
* 对redis字符串类型数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public
ValueOperations
<
String
,
Object
>
valueOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
return
redisTemplate
.
opsForValue
();
}
/**
* 对链表类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public
ListOperations
<
String
,
Object
>
listOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
return
redisTemplate
.
opsForList
();
}
/**
* 对无序集合类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public
SetOperations
<
String
,
Object
>
setOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
return
redisTemplate
.
opsForSet
();
}
/**
* 对有序集合类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public
ZSetOperations
<
String
,
Object
>
zSetOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
return
redisTemplate
.
opsForZSet
();
}
}
\ No newline at end of file
src/main/java/com/cx/cn/cxquartz/config/RedisConfig.java
deleted
100644 → 0
View file @
efa10bcb
package
com
.
cx
.
cn
.
cxquartz
.
config
;
import
com.fasterxml.jackson.annotation.JsonAutoDetect
;
import
com.fasterxml.jackson.annotation.PropertyAccessor
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
org.springframework.cache.annotation.CachingConfigurerSupport
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.data.redis.connection.RedisConnectionFactory
;
import
org.springframework.data.redis.connection.jedis.JedisConnectionFactory
;
import
org.springframework.data.redis.core.*
;
import
org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer
;
import
org.springframework.data.redis.serializer.StringRedisSerializer
;
// @Configuration
@EnableCaching
//开启注解
public
class
RedisConfig
extends
CachingConfigurerSupport
{
/**
* retemplate相关配置
*
* @param factory
* @return
*/
@Bean
public
RedisTemplate
<
String
,
Object
>
redisTemplate
(
RedisConnectionFactory
factory
)
{
RedisTemplate
<
String
,
Object
>
template
=
new
RedisTemplate
<>();
// 配置连接工厂
template
.
setConnectionFactory
(
factory
);
//使用Jackson2JsonRedisSerializer来序列化和反序列化redis的value值(默认使用JDK的序列化方式)
Jackson2JsonRedisSerializer
jacksonSeial
=
new
Jackson2JsonRedisSerializer
(
Object
.
class
);
ObjectMapper
om
=
new
ObjectMapper
();
// 指定要序列化的域,field,get和set,以及修饰符范围,ANY是都有包括private和public
om
.
setVisibility
(
PropertyAccessor
.
ALL
,
JsonAutoDetect
.
Visibility
.
ANY
);
// 指定序列化输入的类型,类必须是非final修饰的,final修饰的类,比如String,Integer等会跑出异常
om
.
enableDefaultTyping
(
ObjectMapper
.
DefaultTyping
.
NON_FINAL
);
jacksonSeial
.
setObjectMapper
(
om
);
// 值采用json序列化
template
.
setValueSerializer
(
jacksonSeial
);
//使用StringRedisSerializer来序列化和反序列化redis的key值
template
.
setKeySerializer
(
new
StringRedisSerializer
());
// 设置hash key 和value序列化模式
template
.
setHashKeySerializer
(
new
StringRedisSerializer
());
template
.
setHashValueSerializer
(
jacksonSeial
);
template
.
afterPropertiesSet
();
return
template
;
}
/**
* 对hash类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public
HashOperations
<
String
,
String
,
Object
>
hashOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
return
redisTemplate
.
opsForHash
();
}
/**
* 对redis字符串类型数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public
ValueOperations
<
String
,
Object
>
valueOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
return
redisTemplate
.
opsForValue
();
}
// @Bean
// public JedisConnectionFactory redisConnectionFactory() {
// JedisConnectionFactory jedisConnectionFactory = new JedisConnectionFactory();
// jedisConnectionFactory.setHostName("<server-hostname-here>");
// jedisConnectionFactory.setPort(6379);
// jedisConnectionFactory.setPassword("<server-password-here>");
// jedisConnectionFactory.afterPropertiesSet();
// return jedisConnectionFactory;
// }
/**
* 对链表类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public
ListOperations
<
String
,
Object
>
listOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
return
redisTemplate
.
opsForList
();
}
/**
* 对无序集合类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public
SetOperations
<
String
,
Object
>
setOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
return
redisTemplate
.
opsForSet
();
}
/**
* 对有序集合类型的数据操作
*
* @param redisTemplate
* @return
*/
@Bean
public
ZSetOperations
<
String
,
Object
>
zSetOperations
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
return
redisTemplate
.
opsForZSet
();
}
}
src/main/java/com/cx/cn/cxquartz/job/WebSocket.java
deleted
100644 → 0
View file @
efa10bcb
package
com
.
cx
.
cn
.
cxquartz
.
job
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Component
;
import
javax.websocket.*
;
import
javax.websocket.server.PathParam
;
import
javax.websocket.server.ServerEndpoint
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
@Component
@ServerEndpoint
(
"/websocket/{name}"
)
public
class
WebSocket
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
WebSocket
.
class
);
/**
* 与某个客户端的连接对话,需要通过它来给客户端发送消息
*/
private
Session
session
;
/**
* 标识当前连接客户端的用户名
*/
private
String
name
;
/**
* 用于存所有的连接服务的客户端,这个对象存储是安全的
*/
private
static
ConcurrentHashMap
<
String
,
WebSocket
>
webSocketSet
=
new
ConcurrentHashMap
<>();
@OnOpen
public
void
OnOpen
(
Session
session
,
@PathParam
(
value
=
"name"
)
String
name
)
{
this
.
session
=
session
;
this
.
name
=
name
;
// name是用来表示唯一客户端,如果需要指定发送,需要指定发送通过name来区分
webSocketSet
.
put
(
name
,
this
);
}
@OnClose
public
void
OnClose
()
{
webSocketSet
.
remove
(
this
.
name
);
}
@OnError
public
void
OnError
(
@PathParam
(
"name"
)
String
name
,
Throwable
throwable
,
Session
session
)
{
webSocketSet
.
remove
(
name
);
}
@OnMessage
public
void
OnMessage
(
String
message
)
{
//判断是否需要指定发送,具体规则自定义
if
(
message
.
indexOf
(
"HEARTBEAT"
)>=
0
){
Map
map
=
new
HashMap
();
map
.
put
(
"type"
,
"HEARTBEAT"
);
map
.
put
(
"ts"
,
new
Date
().
getTime
());
try
{
AppointSending
(
name
,
new
ObjectMapper
().
writeValueAsString
(
map
));
}
catch
(
Exception
ex
)
{
logger
.
error
(
"websocket->OnMessage eror:{}"
,
ex
.
toString
());
}
}
}
/**
* 群发
*
* @param message
*/
public
static
void
GroupSending
(
String
message
)
{
for
(
String
name
:
webSocketSet
.
keySet
())
{
try
{
if
(
null
!=
webSocketSet
.
get
(
name
)
&&
null
!=
webSocketSet
.
get
(
name
).
session
&&
null
!=
webSocketSet
.
get
(
name
).
session
.
getBasicRemote
())
webSocketSet
.
get
(
name
).
session
.
getBasicRemote
().
sendText
(
message
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"websocket->GroupSending eror:{}"
,
e
.
toString
());
}
}
}
/**
* 指定发送
*
* @param name
* @param message
*/
public
void
AppointSending
(
String
name
,
String
message
)
{
if
(
null
!=
webSocketSet
.
get
(
name
)
&&
null
!=
webSocketSet
.
get
(
name
).
session
&&
null
!=
webSocketSet
.
get
(
name
).
session
.
getBasicRemote
())
{
synchronized
(
webSocketSet
.
get
(
name
).
session
)
{
try
{
webSocketSet
.
get
(
name
).
session
.
getBasicRemote
().
sendText
(
message
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"websocket->AppointSending eror:{}"
,
e
.
toString
());
}
}
}
}
}
src/main/java/com/cx/cn/cxquartz/service/quartz/impl/QuartzServiceImpl.java
View file @
4be1946a
...
@@ -10,19 +10,17 @@ import com.cx.cn.cxquartz.service.quartz.QuartzTaskRecordsService;
...
@@ -10,19 +10,17 @@ import com.cx.cn.cxquartz.service.quartz.QuartzTaskRecordsService;
import
com.cx.cn.cxquartz.util.ResultEnum
;
import
com.cx.cn.cxquartz.util.ResultEnum
;
import
com.cx.cn.cxquartz.util.ResultUtil
;
import
com.cx.cn.cxquartz.util.ResultUtil
;
import
com.cx.cn.cxquartz.vo.QuartzTaskRecordsVo
;
import
com.cx.cn.cxquartz.vo.QuartzTaskRecordsVo
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.quartz.*
;
import
org.quartz.*
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.kafka.core.KafkaTemplate
;
import
org.springframework.scheduling.quartz.SchedulerFactoryBean
;
import
org.springframework.scheduling.quartz.SchedulerFactoryBean
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -38,8 +36,6 @@ public class QuartzServiceImpl implements QuartzService, InitializingBean {
...
@@ -38,8 +36,6 @@ public class QuartzServiceImpl implements QuartzService, InitializingBean {
private
AtomicInteger
atomicInteger
;
private
AtomicInteger
atomicInteger
;
@Autowired
private
KafkaTemplate
kafkaTemplate
;
@Autowired
@Autowired
private
QuartzTaskInformationsService
quartzTaskInformationsService
;
private
QuartzTaskInformationsService
quartzTaskInformationsService
;
...
@@ -289,7 +285,6 @@ public class QuartzServiceImpl implements QuartzService, InitializingBean {
...
@@ -289,7 +285,6 @@ public class QuartzServiceImpl implements QuartzService, InitializingBean {
*/
*/
@Override
@Override
public
void
sendMessage
(
String
message
)
{
public
void
sendMessage
(
String
message
)
{
kafkaTemplate
.
send
(
QUARTZ_TOPIC
,
message
);
logger
.
info
(
"给kafka推送消息message={}成功"
,
message
);
logger
.
info
(
"给kafka推送消息message={}成功"
,
message
);
}
}
...
...
src/main/resources/application-local.yml
View file @
4be1946a
...
@@ -20,10 +20,10 @@ spring:
...
@@ -20,10 +20,10 @@ spring:
poolPreparedStatements
:
true
poolPreparedStatements
:
true
maxOpenPreparedStatements
:
20
maxOpenPreparedStatements
:
20
rabbitmq
:
rabbitmq
:
host
:
1
27.0.0.1
host
:
1
92.168.168.110
port
:
5672
port
:
5672
username
:
guest
username
:
admin
password
:
guest
password
:
admin
virtual-host
:
/
virtual-host
:
/
#消息发送到交换机确认机制,是否确认回调
#消息发送到交换机确认机制,是否确认回调
publisher-confirms
:
true
publisher-confirms
:
true
...
@@ -46,12 +46,18 @@ spring:
...
@@ -46,12 +46,18 @@ spring:
initial-interval
:
3000
initial-interval
:
3000
#最大重试次数
#最大重试次数
max-attempts
:
3
max-attempts
:
3
redis
:
database
:
0
host
:
127.0.0.1
port
:
6379
#logging:
redis
:
database
:
0
host
:
192.168.168.110
port
:
6379
pool
:
max-active
:
100
#连接池最大连接数(负值表示没有限制)
max-wait
:
3000
#连接池最大阻塞等待时间(负值表示没有限制)
max-idle
:
200
#连接池最大空闭连接数
min-idle
:
50
#连接汉最小空闲连接数
timeout
:
600
#连接超时时间(毫秒)
#logging:W
# level:
# level:
# root:
# root:
# info
# info
...
...
src/test/java/com/quartz/cn/com/cx/cn/cxquartz/CXQuartzApplicationTests.java
View file @
4be1946a
package
com
.
quartz
.
cn
.
com
.
cx
.
cn
.
cxquartz
;
package
com
.
quartz
.
cn
.
com
.
cx
.
cn
.
cxquartz
;
import
org.junit.Test
;
import
org.springframework.boot.test.context.SpringBootTest
;
@SpringBootTest
public
class
CXQuartzApplicationTests
{
public
class
CXQuartzApplicationTests
{
//
//
// @Test
// @Test
...
@@ -26,16 +21,7 @@ import org.springframework.boot.test.context.SpringBootTest;
...
@@ -26,16 +21,7 @@ import org.springframework.boot.test.context.SpringBootTest;
// }
// }
@Test
public
void
testfilepath
(){
String
ftpfilepath
=
"ftp://jiuling:9ling.cn@172.16.24.29:21/gstraff/picturedemo/20210625.jpg"
;
String
ftppath
=
"jiuling:9ling.cn@172.16.24.29:21"
;
ftpfilepath
=
ftpfilepath
.
replace
(
"ftp://"
+
ftppath
+
"/"
,
""
);
System
.
out
.
println
(
ftpfilepath
);
String
ftpPath
=
"ftp://"
+
ftppath
+
"/"
+
ftpfilepath
;
System
.
out
.
println
(
ftpPath
);
}
}
}
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