调整示例项目结构.

pull/131/head
chen.ma 2 years ago
parent 3080a97dbe
commit e11153aa12

@ -0,0 +1,48 @@
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-example</artifactId>
<version>${revision}</version>
</parent>
<artifactId>hippo4j-core-apollo-spring-boot-starter-example</artifactId>
<name>${project.artifactId}</name>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-example-core</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cn.hippo4j</groupId>
<artifactId>hippo4j-core-spring-boot-starter</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
</project>

@ -0,0 +1,13 @@
package cn.hippo4j.example.core.apollo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Hippo4jCoreApolloExampleApplication {
public static void main(String[] args) {
SpringApplication.run(Hippo4jCoreApolloExampleApplication.class, args);
}
}

@ -0,0 +1,41 @@
server:
port: 8090
servlet:
context-path: /example
spring:
profiles:
active: dev
dynamic:
thread-pool:
enable: true
enable-banner: true
check-state-interval: 3
notify-platforms:
- platform: 'WECHAT'
secret-key: 1d307bfa-815f-4662-a2e5-99415e947bb8
- platform: 'DING'
secret-key: 56417ebba6a27ca352f0de77a2ae9da66d01f39610b5ee8a6033c60ef9071c55
apollo:
namespace: xxxx
config-file-type: yml
executors:
- thread-pool-id: 'message-consume'
core-pool-size: 1
maximum-pool-size: 1
queue-capacity: 1
blocking-queue: 'LinkedBlockingQueue'
rejected-handler: 'AbortPolicy'
keep-alive-time: 6691
allow-core-thread-time-out: true
thread-name-prefix: 'message-consume'
notify:
is-alarm: true
active-alarm: 80
capacity-alarm: 80
interval: 8
receives:
WECHAT: 'xxx' # Fill in the enterprise weChat userId
DING: 'xxx' # phone

@ -0,0 +1,13 @@
package cn.hippo4j.example.core.apollo;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class Hippo4jCoreApolloSpringBootStarterExampleApplicationTests {
@Test
void contextLoads() {
}
}

@ -0,0 +1,33 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/

@ -1,4 +1,4 @@
package cn.hippo4j.example.core.starter;
package cn.hippo4j.example.core.nacos;
import cn.hippo4j.core.enable.EnableDynamicThreadPool;
import org.springframework.boot.SpringApplication;
@ -6,10 +6,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@EnableDynamicThreadPool
@SpringBootApplication(scanBasePackages = "cn.hippo4j.example.core")
public class Hippo4jCoreExampleApplication {
public class Hippo4jCoreNacosExampleApplication {
public static void main(String[] args) {
SpringApplication.run(Hippo4jCoreExampleApplication.class, args);
SpringApplication.run(Hippo4jCoreNacosExampleApplication.class, args);
}
}

@ -9,11 +9,9 @@ spring:
cloud:
nacos:
config:
# group: DEFAULT_GROUP
password: nacos
server-addr: 192.168.1.5:8848
server-addr: 127.0.0.1:8848
username: nacos
# namespace: public
dynamic:
thread-pool:

@ -21,6 +21,10 @@
<modules>
<module>hippo4j-example-core</module>
<module>hippo4j-core-nacos-spring-boot-starter-example</module>
<module>hippo4j-core-apollo-spring-boot-starter-example</module>
</modules>
</project>

Loading…
Cancel
Save