Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0b9153f1
authored
Nov 19, 2019
by
许雪里
Committed by
GitHub
Nov 19, 2019
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge pull request #1181 from j112929/master
修复服务器报错无法创建bean XxlJobAdminConfig
parents
cc5aa982
49d7c97a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
11 deletions
xxl-job-admin/src/main/java/com/xxl/job/admin/core/conf/XxlJobAdminBean
xxl-job-admin/src/main/java/com/xxl/job/admin/core/conf/XxlJobAdminConfig.java
xxl-job-admin/src/main/java/com/xxl/job/admin/core/conf/XxlJobScheduler.java
xxl-job-admin/src/main/java/com/xxl/job/admin/core/conf/XxlJobAdminBean
0 → 100644
View file @
0b9153f1
package
com
.
xxl
.
job
.
admin
.
conf
;
import
org
.
springframework
.
beans
.
factory
.
annotation
.
Qualifier
;
import
org
.
springframework
.
context
.
annotation
.
Bean
;
import
org
.
springframework
.
context
.
annotation
.
Configuration
;
/**
*
@
Auther
:
zhuolin
.
ji
*
@
Date
:
2019
/
10
/
12
18
:
08
*
@
Package
:
com
.
xxl
.
job
.
admin
.
conf
*
@
Description
:
*/
@
Configuration
public
class
XxlJobAdminBean
{
@
Bean
(
name
=
"xxlJobAdminConfig"
)
public
XxlJobAdminConfig
getXxlJobAdminConfig
()
{
return
new
XxlJobAdminConfig
();
}
@
Bean
(
initMethod
=
"init"
,
destroyMethod
=
"destroy"
)
public
XxlJobScheduler
getXxlJobScheduler
(@
Qualifier
(
value
=
"xxlJobAdminConfig"
)
XxlJobAdminConfig
xxlJobAdminConfig
)
{
XxlJobAdminConfig
.
setAdminConfig
(
xxlJobAdminConfig
);
return
new
XxlJobScheduler
();
}
}
xxl-job-admin/src/main/java/com/xxl/job/admin/core/conf/XxlJobAdminConfig.java
View file @
0b9153f1
...
...
@@ -18,16 +18,15 @@ import javax.sql.DataSource;
*
* @author xuxueli 2017-04-28
*/
@Component
public
class
XxlJobAdminConfig
implements
InitializingBean
{
public
class
XxlJobAdminConfig
{
private
static
XxlJobAdminConfig
adminConfig
=
null
;
public
static
XxlJobAdminConfig
getAdminConfig
()
{
return
adminConfig
;
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
adminConfig
=
this
;
public
static
void
setAdminConfig
(
XxlJobAdminConfig
config
)
{
XxlJobAdminConfig
.
adminConfig
=
config
;
}
// conf
...
...
xxl-job-admin/src/main/java/com/xxl/job/admin/core/conf/XxlJobScheduler.java
View file @
0b9153f1
...
...
@@ -33,14 +33,13 @@ import java.util.concurrent.ConcurrentMap;
/**
* @author xuxueli 2018-10-28 00:18:17
*/
@Component
@DependsOn
(
"xxlJobAdminConfig"
)
public
class
XxlJobScheduler
implements
InitializingBean
,
DisposableBean
{
public
class
XxlJobScheduler
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
XxlJobScheduler
.
class
);
@Override
public
void
afterPropertiesSe
t
()
throws
Exception
{
public
void
ini
t
()
throws
Exception
{
// init i18n
initI18n
();
...
...
@@ -59,7 +58,7 @@ public class XxlJobScheduler implements InitializingBean, DisposableBean {
logger
.
info
(
">>>>>>>>> init xxl-job admin success."
);
}
@Override
public
void
destroy
()
throws
Exception
{
// stop-schedule
...
...
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