Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
qq254963746 committed Apr 17, 2016
1 parent 460a9f3 commit f7a8ce9
Show file tree
Hide file tree
Showing 13 changed files with 105 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lts-example-jobclient</artifactId>
<groupId>com.github.ltsopensource</groupId>
<version>1.6.8-SNAPSHOT</version>
<version>1.6.7.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>lts-example-jobclient-springboot</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.github.ltsopensource.example.springboot;

import com.github.ltsopensource.spring.boot.annotation.EnableJobClient;
import com.github.ltsopensource.spring.boot.annotation.EnableJobTracker;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
@Component
public class JobClientReferenceBean implements InitializingBean {

/**
* 自己的业务类,就可以这样引用了
*/
@Autowired
private JobClient jobClient;

Expand Down
2 changes: 1 addition & 1 deletion lts-example-jobclient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lts-examples</artifactId>
<groupId>com.github.ltsopensource</groupId>
<version>1.6.8-SNAPSHOT</version>
<version>1.6.7.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lts-example-jobtracker</artifactId>
<groupId>com.github.ltsopensource</groupId>
<version>1.6.8-SNAPSHOT</version>
<version>1.6.7.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion lts-example-jobtracker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lts-examples</artifactId>
<groupId>com.github.ltsopensource</groupId>
<version>1.6.8-SNAPSHOT</version>
<version>1.6.7.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>lts-example-jobtracker</artifactId>
Expand Down
27 changes: 27 additions & 0 deletions lts-example-monitor/lts-example-monitor-springboot/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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>lts-example-monitor</artifactId>
<groupId>com.github.ltsopensource</groupId>
<version>1.6.7.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>lts-example-monitor-springboot</artifactId>


<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
</dependencies>


</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.github.ltsopensource.example.springboot;

import com.github.ltsopensource.spring.boot.annotation.EnableMonitor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

/**
* @author Robert HG ([email protected]) on 4/9/16.
*/
@SpringBootApplication
@EnableMonitor
@ComponentScan("com.github.ltsopensource.example")
public class Application {

public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
lts.monitor.cluster-name=test_cluster
lts.monitor.registry-address=zookeeper://127.0.0.1:2181
lts.monitor.configs.job.logger=mysql
lts.monitor.configs.job.queue=mysql
lts.monitor.configs.jdbc.url=jdbc:mysql://127.0.0.1:3306/lts
lts.monitor.configs.jdbc.username=root
lts.monitor.configs.jdbc.password=root
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

log4j.rootLogger=INFO,stdout

log4j.appender.stdout.Threshold=INFO
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%-5p] [%d{HH:mm:ss}] %c - %m%n
37 changes: 35 additions & 2 deletions lts-example-monitor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,44 @@
<parent>
<artifactId>lts-examples</artifactId>
<groupId>com.github.ltsopensource</groupId>
<version>1.6.8-SNAPSHOT</version>
<version>1.6.7.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<packaging>pom</packaging>
<modules>
<module>lts-example-monitor-springboot</module>
</modules>
<artifactId>lts-example-monitor</artifactId>

<dependencies>
<dependency>
<groupId>com.github.ltsopensource</groupId>
<artifactId>lts-monitor</artifactId>
</dependency>
<dependency>
<groupId>com.github.ltsopensource</groupId>
<artifactId>lts-spring</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>com.github.sgroschupf</groupId>
<artifactId>zkclient</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lts-example-tasktracker</artifactId>
<groupId>com.github.ltsopensource</groupId>
<version>1.6.8-SNAPSHOT</version>
<version>1.6.7.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion lts-example-tasktracker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lts-examples</artifactId>
<groupId>com.github.ltsopensource</groupId>
<version>1.6.8-SNAPSHOT</version>
<version>1.6.7.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
Expand Down

0 comments on commit f7a8ce9

Please sign in to comment.