1:提交一个ops-ui的代码,可以启动无需nginx ,调试方便
2:processor-api的module当时因为冲突删除了,新建一个 3: 修改了pom文件的引用问题
This commit is contained in:
parent
c7223f3ff3
commit
1eb28acf44
26
.idea/compiler.xml
generated
26
.idea/compiler.xml
generated
@ -331,6 +331,30 @@
|
||||
</processorPath>
|
||||
<module name="module-ci-execute" />
|
||||
</profile>
|
||||
<profile name="Annotation profile for ops-ui" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<processorPath useClasspath="false">
|
||||
<entry name="$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-configuration-processor/3.3.4/spring-boot-configuration-processor-3.3.4.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/mapstruct/mapstruct-processor/1.6.2/mapstruct-processor-1.6.2.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/mapstruct/mapstruct/1.6.2/mapstruct-1.6.2.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.34/lombok-1.18.34.jar" />
|
||||
</processorPath>
|
||||
<module name="ops-ui" />
|
||||
</profile>
|
||||
<profile name="Annotation profile for module-ci-process-api" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<processorPath useClasspath="false">
|
||||
<entry name="$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-configuration-processor/3.3.4/spring-boot-configuration-processor-3.3.4.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/mapstruct/mapstruct-processor/1.6.2/mapstruct-processor-1.6.2.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/mapstruct/mapstruct/1.6.2/mapstruct-1.6.2.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.34/lombok-1.18.34.jar" />
|
||||
</processorPath>
|
||||
<module name="module-ci-process-api" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="module-ci-common-pipeline" target="17" />
|
||||
@ -339,7 +363,6 @@
|
||||
<module name="module-ci-event" target="17" />
|
||||
<module name="module-ci-log" target="17" />
|
||||
<module name="module-ci-market" target="17" />
|
||||
<module name="module-ci-process-api" target="17" />
|
||||
<module name="module-ci-project" target="17" />
|
||||
<module name="module-ci-quality" target="17" />
|
||||
<module name="module-ci-store-api" target="17" />
|
||||
@ -368,6 +391,7 @@
|
||||
<module name="modules" options="-parameters" />
|
||||
<module name="ops-pro" options="-parameters" />
|
||||
<module name="ops-server" options="-parameters" />
|
||||
<module name="ops-ui" options="-parameters" />
|
||||
<module name="spring-boot-starter-biz-data-permission" options="-parameters" />
|
||||
<module name="spring-boot-starter-biz-ip" options="-parameters" />
|
||||
<module name="spring-boot-starter-biz-tenant" options="-parameters" />
|
||||
|
2
.idea/encodings.xml
generated
2
.idea/encodings.xml
generated
@ -101,6 +101,8 @@
|
||||
<file url="file://$PROJECT_DIR$/modules/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/ops-server/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/ops-server/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/ops-ui/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/ops-ui/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/system-framework/src/main/java" charset="UTF-8" />
|
||||
|
10
dependencies/.flattened-pom.xml
vendored
10
dependencies/.flattened-pom.xml
vendored
@ -197,6 +197,16 @@
|
||||
<artifactId>module-system-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-process-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-process-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-commons</artifactId>
|
||||
|
11
dependencies/pom.xml
vendored
11
dependencies/pom.xml
vendored
@ -220,6 +220,17 @@
|
||||
<artifactId>module-system-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-process-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-process-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!--ci-pipeline-dependency-->
|
||||
|
||||
<dependency>
|
||||
|
21
modules/module-ci-process-api/pom.xml
Normal file
21
modules/module-ci-process-api/pom.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>modules</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>module-ci-process-api</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-commons</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -126,43 +126,4 @@ public class WinRMHelper {
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
// WinRMHelper exec = new WinRMHelper("192.168.0.88", "hrb", "1qaz!QAZ");
|
||||
// List<String> commands = new ArrayList<>();
|
||||
//// commands.add("powershell");
|
||||
// commands.add("dir");
|
||||
// commands.add("cd /d D:\\Users\\hrb\\Desktop");
|
||||
// commands.add("dir");
|
||||
// commands.add("git clone -b master http://192.168.0.12:3000/liuyuchao/testrepo.git");
|
||||
//// commands.add("rmdir /s /q 456123");
|
||||
//
|
||||
// int resp = exec.execute(commands, System.out::println);
|
||||
// System.out.println(resp);
|
||||
PipedWriter writer = new PipedWriter();
|
||||
PipedReader reader = new PipedReader(writer);
|
||||
|
||||
Thread t = new Thread(() -> {
|
||||
try {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
writer.write("Line " + i + "\n");
|
||||
writer.flush();
|
||||
Thread.sleep(500);
|
||||
}
|
||||
writer.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
t.start();
|
||||
|
||||
try (BufferedReader br = new BufferedReader(reader)) {
|
||||
String line;
|
||||
while ((line = br.readLine()) != null) {
|
||||
System.out.println(line);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,9 +15,10 @@
|
||||
<module>module-infra-biz</module>
|
||||
<module>module-system-api</module>
|
||||
<module>module-system-biz</module>
|
||||
<module>module-ci-process-biz</module>
|
||||
<module>module-ci-repository</module>
|
||||
<module>module-ci-execute</module>
|
||||
<module>module-ci-process-api</module>
|
||||
<module>module-ci-process-biz</module>
|
||||
</modules>
|
||||
|
||||
<artifactId>modules</artifactId>
|
||||
|
@ -47,7 +47,6 @@
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-process-biz</artifactId>
|
||||
<version>2.0.0-jdk17</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -45,7 +45,7 @@ spring:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://1.14.125.6:13306/ops-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||
url: jdbc:mysql://1.14.125.6:13306/ops-pro-temp?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
||||
@ -63,7 +63,7 @@ spring:
|
||||
# password: Yudao@2024 # OpenGauss 连接的示例
|
||||
slave: # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:mysql://1.14.125.6:13306/ops-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
||||
url: jdbc:mysql://1.14.125.6:13306/ops-pro-temp?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
||||
username: root
|
||||
password: 1qaz!QAZ
|
||||
|
||||
|
45
ops-ui/pom.xml
Normal file
45
ops-ui/pom.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?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>
|
||||
<artifactId>ops-pro</artifactId>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>ops-ui</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-filtering</artifactId>
|
||||
<version>1.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,17 @@
|
||||
package cd.casic.ops.ui;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* @description: 启动类
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/31 0:19
|
||||
* @version: 1.0
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class StaticUiApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(StaticUiApplication.class, args);
|
||||
}
|
||||
}
|
46
ops-ui/src/main/java/cd/casic/ops/ui/UiConfig.java
Normal file
46
ops-ui/src/main/java/cd/casic/ops/ui/UiConfig.java
Normal file
@ -0,0 +1,46 @@
|
||||
package cd.casic.ops.ui;
|
||||
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
/**
|
||||
* @description: 不想弄nginx配置,直接启动
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/31 0:19
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class UiConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
// 管理后台 Ops 的配置
|
||||
registry.addResourceHandler("/yudao/**", "/yudao/", "/yudao")
|
||||
.addResourceLocations("classpath:/yudao/")
|
||||
.addResourceLocations(new ClassPathResource("/yudao/index.html") {
|
||||
|
||||
@Override
|
||||
public Resource createRelative(String relativePath) {
|
||||
return this;
|
||||
}
|
||||
|
||||
})
|
||||
;
|
||||
}
|
||||
|
||||
@Component
|
||||
public static class UiApplicationRunner implements ApplicationRunner {
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
System.out.println("Ops 项目 无服务启动版:http://127.0.0.1:4096/casic/");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
3
ops-ui/src/main/resources/application.properties
Normal file
3
ops-ui/src/main/resources/application.properties
Normal file
@ -0,0 +1,3 @@
|
||||
spring.application.name=static-ui
|
||||
spring.web.resources.static-locations=classpath:/yudao/**
|
||||
server.port=4096
|
Loading…
x
Reference in New Issue
Block a user