main #1

Open
oyo wants to merge 113 commits from main into release
12 changed files with 104 additions and 17 deletions

7
template/.gitignore vendored
View File

@@ -33,3 +33,10 @@ logs/
!modules/.gitkeep !modules/.gitkeep
.gitattributes .gitattributes
.toco/config.local.yml .toco/config.local.yml
.fslckout
_FOSSIL_
_FOSSIL_-journal
.fslckout
.fslckout-journal
*.pem

8
template/.toco/README Normal file
View File

@@ -0,0 +1,8 @@
目录用于存放rules只支持.md文件。
global: 目录用于存放所有agent通用rules
toco: 目录用于存放Toco Agent专用rules用于外层流程整体控制
modeling:目录用于存放Modeling Agent专用rules用于领域建模阶段
plan: 目录用于存放Plan Agent专用rules用于整体规划阶段
design:目录用于存放Design Agent专用rules用于TOCO设计元素设计
coding:目录用于存放Coding Agent专用rules用于编码阶段

View File

@@ -0,0 +1 @@
目录用于存放Coding Agent专用rules用于编码阶段只支持.md文件

View File

@@ -0,0 +1 @@
目录用于存放Design Agent专用rules用于TOCO设计元素设计只支持.md文件

View File

@@ -0,0 +1 @@
目录用于存放所有agent通用rules只支持.md文件

View File

@@ -0,0 +1 @@
目录用于存放Modeling Agent专用rules用于领域建模阶段只支持.md文件

View File

@@ -0,0 +1 @@
目录用于存放Plan Agent专用rules用于整体规划阶段只支持.md文件

View File

@@ -0,0 +1 @@
目录用于存放Toco Agent专用rules用于外层流程整体控制只支持.md文件

View File

@@ -63,6 +63,11 @@
<artifactId>rocketmq-client</artifactId> <artifactId>rocketmq-client</artifactId>
</dependency> </dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.apache.tomcat.embed</groupId> <groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId> <artifactId>tomcat-embed-core</artifactId>

View File

@@ -0,0 +1,71 @@
package {{ .package }}.entrance.web.config;
import org.apache.catalina.connector.Connector;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.io.ClassPathResource;
import java.io.IOException;
@Configuration
public class SSLConfig {
@Bean
public ServletWebServerFactory servletContainer(Environment env) {
TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
// 禁用自动配置的SSL如果存在
tomcat.setRegisterDefaultServlet(false);
if (hasSslConfig(env)) {
tomcat.addAdditionalTomcatConnectors(createSslConnector(env));
}
return tomcat;
}
private boolean hasSslConfig(Environment env) {
return env.containsProperty("ssl_certificate")
&& env.containsProperty("ssl_certificate-private-key");
}
private Connector createSslConnector(Environment env) {
String certPath = env.getProperty("ssl_certificate");
String keyPath = env.getProperty("ssl_certificate-private-key");
String httpsPort = env.getProperty("server.https.port", "8443");
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
connector.setScheme("https");
connector.setSecure(true);
connector.setPort(Integer.parseInt(httpsPort));
// 明确设置SSL配置
connector.setProperty("SSLEnabled", "true");
connector.setProperty("sslProtocol", "TLS");
connector.setProperty("clientAuth", "false");
connector.setProperty("sslEnabledProtocols", "TLSv1.2,TLSv1.3");
// 处理证书路径
connector.setProperty("certificateFile", extractFilePath(certPath));
connector.setProperty("certificateKeyFile", extractFilePath(keyPath));
return connector;
}
private String extractFilePath(String classpathResource) {
if (classpathResource == null) return null;
if (classpathResource.startsWith("classpath:")) {
String resource = classpathResource.substring("classpath:".length());
try {
return new ClassPathResource(resource).getFile().getAbsolutePath();
} catch (IOException e) {
throw new RuntimeException("Failed to locate SSL certificate file", e);
}
}
return classpathResource;
}
}

View File

@@ -128,3 +128,4 @@ liteflow.monitor.enable-log=true
#create default table auto #create default table auto
vs.db.basetable.create=true vs.db.basetable.create=true
server.ssl.enabled=false

View File

@@ -80,6 +80,7 @@
<ox.sprintboot.web.starter.version>1.0-SNAPSHOT</ox.sprintboot.web.starter.version> <ox.sprintboot.web.starter.version>1.0-SNAPSHOT</ox.sprintboot.web.starter.version>
<ox.basidc.common>1.0-SNAPSHOT</ox.basidc.common> <ox.basidc.common>1.0-SNAPSHOT</ox.basidc.common>
<vs.sqlmapper.spring>1.0.0-SNAPSHOT</vs.sqlmapper.spring> <vs.sqlmapper.spring>1.0.0-SNAPSHOT</vs.sqlmapper.spring>
<jjwt.version>0.9.1</jjwt.version>
{{- if eq .dbType "dm" }} {{- if eq .dbType "dm" }}
<dm.driver.version>18</dm.driver.version> <dm.driver.version>18</dm.driver.version>
<db.hiernate.dialect.version>8.1.3.140</db.hiernate.dialect.version> <db.hiernate.dialect.version>8.1.3.140</db.hiernate.dialect.version>
@@ -371,6 +372,11 @@
<artifactId>opensearch-rest-high-level-client</artifactId> <artifactId>opensearch-rest-high-level-client</artifactId>
<version>${opensearch.version}</version> <version>${opensearch.version}</version>
</dependency> </dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jjwt.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.hibernate</groupId> <groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId> <artifactId>hibernate-core</artifactId>
@@ -468,23 +474,6 @@
<skip>true</skip> <skip>true</skip>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<configuration>
<java>
<googleJavaFormat>
<groupArtifact>com.google.googlejavaformat:google-java-format</groupArtifact>
<version>1.22.0</version>
<style>AOSP</style>
<reorderImports>true</reorderImports>
<reflowLongStrings>true</reflowLongStrings>
<formatJavadoc>true</formatJavadoc>
</googleJavaFormat>
</java>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
<modules> <modules>