Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
tool
/
xxl-job
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
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
Tag
Download
Plain Diff
Merge pull request #1181 from j112929/master
修复服务器报错无法创建bean XxlJobAdminConfig
2 parents
cc5aa982
49d7c97a
Show 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 @
0b9153f
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 @
0b9153f
...
@@ -18,16 +18,15 @@ import javax.sql.DataSource;
...
@@ -18,16 +18,15 @@ import javax.sql.DataSource;
*
*
* @author xuxueli 2017-04-28
* @author xuxueli 2017-04-28
*/
*/
@Component
public
class
XxlJobAdminConfig
implements
InitializingBean
{
public
class
XxlJobAdminConfig
{
private
static
XxlJobAdminConfig
adminConfig
=
null
;
private
static
XxlJobAdminConfig
adminConfig
=
null
;
public
static
XxlJobAdminConfig
getAdminConfig
()
{
public
static
XxlJobAdminConfig
getAdminConfig
()
{
return
adminConfig
;
return
adminConfig
;
}
}
@Override
public
static
void
setAdminConfig
(
XxlJobAdminConfig
config
)
{
public
void
afterPropertiesSet
()
throws
Exception
{
XxlJobAdminConfig
.
adminConfig
=
config
;
adminConfig
=
this
;
}
}
// conf
// conf
...
...
xxl-job-admin/src/main/java/com/xxl/job/admin/core/conf/XxlJobScheduler.java
View file @
0b9153f
...
@@ -33,14 +33,13 @@ import java.util.concurrent.ConcurrentMap;
...
@@ -33,14 +33,13 @@ import java.util.concurrent.ConcurrentMap;
/**
/**
* @author xuxueli 2018-10-28 00:18:17
* @author xuxueli 2018-10-28 00:18:17
*/
*/
@Component
@DependsOn
(
"xxlJobAdminConfig"
)
public
class
XxlJobScheduler
{
public
class
XxlJobScheduler
implements
InitializingBean
,
DisposableBean
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
XxlJobScheduler
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
XxlJobScheduler
.
class
);
@Override
public
void
afterPropertiesSe
t
()
throws
Exception
{
public
void
ini
t
()
throws
Exception
{
// init i18n
// init i18n
initI18n
();
initI18n
();
...
@@ -59,7 +58,7 @@ public class XxlJobScheduler implements InitializingBean, DisposableBean {
...
@@ -59,7 +58,7 @@ public class XxlJobScheduler implements InitializingBean, DisposableBean {
logger
.
info
(
">>>>>>>>> init xxl-job admin success."
);
logger
.
info
(
">>>>>>>>> init xxl-job admin success."
);
}
}
@Override
public
void
destroy
()
throws
Exception
{
public
void
destroy
()
throws
Exception
{
// stop-schedule
// stop-schedule
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment