mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-01-03 20:35:29 +08:00
后台目录结构大调整,让结构更清晰
This commit is contained in:
15
jeecg-server-cloud/jeecg-demo-cloud-start/Dockerfile
Normal file
15
jeecg-server-cloud/jeecg-demo-cloud-start/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
FROM anapsix/alpine-java:8_server-jre_unlimited
|
||||
|
||||
MAINTAINER jeecgos@163.com
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
RUN mkdir -p /jeecg-demo-cloud
|
||||
|
||||
WORKDIR /jeecg-demo-cloud
|
||||
|
||||
EXPOSE 7002
|
||||
|
||||
ADD ./target/jeecg-demo-cloud-start-3.4.0.jar ./
|
||||
|
||||
CMD sleep 10;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-demo-cloud-start-3.4.0.jar
|
||||
41
jeecg-server-cloud/jeecg-demo-cloud-start/pom.xml
Normal file
41
jeecg-server-cloud/jeecg-demo-cloud-start/pom.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?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>jeecg-server-cloud</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>3.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>jeecg-demo-cloud-start</artifactId>
|
||||
<description>Demo微服务启动</description>
|
||||
|
||||
<dependencies>
|
||||
<!--引入微服务启动依赖 starter-->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-starter-cloud</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-starter-job</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-module-demo</artifactId>
|
||||
<version>${jeecgboot.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@ -0,0 +1,35 @@
|
||||
package org.jeecg;
|
||||
|
||||
import org.jeecg.common.base.BaseMap;
|
||||
import org.jeecg.common.constant.GlobalConstants;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableFeignClients
|
||||
public class JeecgDemoCloudApplication implements CommandLineRunner {
|
||||
@Autowired
|
||||
private RedisTemplate<String, Object> redisTemplate;
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(JeecgDemoCloudApplication.class, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动的时候,触发下gateway网关刷新
|
||||
*
|
||||
* 解决: 先启动gateway后启动服务,Swagger接口文档访问不通的问题
|
||||
* @param args
|
||||
*/
|
||||
@Override
|
||||
public void run(String... args) {
|
||||
BaseMap params = new BaseMap();
|
||||
params.put(GlobalConstants.HANDLER_NAME, GlobalConstants.LODER_ROUDER_HANDLER);
|
||||
//刷新网关
|
||||
redisTemplate.convertAndSend(GlobalConstants.REDIS_TOPIC_NAME, params);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
server:
|
||||
port: 7002
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: jeecg-demo
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
server-addr: @config.server-addr@
|
||||
discovery:
|
||||
server-addr: ${spring.cloud.nacos.config.server-addr}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:jeecg.yaml
|
||||
- optional:nacos:jeecg-@profile.name@.yaml
|
||||
Reference in New Issue
Block a user