update seata 1.7.1 => 2.3.0

This commit is contained in:
疯狂的狮子Li
2025-03-20 17:38:11 +08:00
parent d2fb7da4aa
commit 6dc7519bdb
18 changed files with 629 additions and 101 deletions

View File

@@ -1,49 +0,0 @@
/*
* Copyright 1999-2019 Seata.io Group.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.seata.server;
import io.seata.common.aot.NativeUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @author spilledyear@outlook.com
*/
@SpringBootApplication(scanBasePackages = {"io.seata"})
public class SeataServerApplication {
public static void main(String[] args) throws Throwable {
try {
// run the spring-boot application
SpringApplication.run(SeataServerApplication.class, args);
} catch (Throwable t) {
// This exception is used to end `spring-boot-maven-plugin:process-aot`, so ignore it.
if ("org.springframework.boot.SpringApplication$AbandonedRunException".equals(t.getClass().getName())) {
throw t;
}
// In the `native-image`, if an exception occurs prematurely during the startup process, the exception log will not be recorded,
// so here we sleep for 20 seconds to observe the exception information.
if (NativeUtils.inNativeImage()) {
t.printStackTrace();
Thread.sleep(20000);
}
throw t;
}
}
}

View File

@@ -0,0 +1,32 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seata.server;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import java.io.IOException;
/**
*/
@SpringBootApplication(scanBasePackages = {"org.apache.seata"})
public class SeataServerApplication {
public static void main(String[] args) throws IOException {
// run the spring-boot application
SpringApplication.run(ServerApplication.class, args);
}
}

View File

@@ -53,7 +53,8 @@ seata:
#access-key: ""
#secret-key: ""
security:
secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
secretKey: rE7bYayhpvduYwCxuhckybEPDXyna6xwm5m7MZjtjrdXjVxAbXAMccXHyaJvB346
tokenValidityInMilliseconds: 1800000
csrf-ignore-urls: /metadata/v1/**
ignore:
urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.jpeg,/**/*.ico,/api/v1/auth/login
urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.jpeg,/**/*.ico,/api/v1/auth/login,/version.json,/health,/error,/vgroup/v1/**

View File

@@ -17,7 +17,7 @@
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<!-- Context listeners -->
<contextListener class="io.seata.server.logging.listener.SystemPropertyLoggerContextListener"/>
<contextListener class="org.apache.seata.server.logging.listener.SystemPropertyLoggerContextListener"/>
<!-- common properties -->
<springProperty name="PORT" source="server.port" defaultValue="7091"/>
<springProperty name="APPLICATION_NAME" source="spring.application.name" defaultValue="seata-server"/>