Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(6495): [seata.tcc] should not be null #6497

Merged
merged 6 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/en-us/2.x.md
funky-eyes marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#6385](https://github.com/apache/incubator-seata/pull/6385)] fix the bug where Role.participant does not execute hooks but clears them.
- [[#6465](https://github.com/apache/incubator-seata/pull/6465)] fix(6257): fix saga mode replay context lost start in 2.x
- [[#6469](https://github.com/apache/incubator-seata/pull/6469)] fix Error in insert sql of [lock_table] data table to sqlserver database
- [[#6497](https://github.com/apache/incubator-seata/pull/6497)] fix tcc properties class when autoconfigure

### optimize:
- [[#6031](https://github.com/apache/incubator-seata/pull/6031)] add a check for the existence of the undolog table
Expand Down
2 changes: 1 addition & 1 deletion changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
- [[#6385](https://github.com/apache/incubator-seata/pull/6385)] 修复Role.Participant不执行hook但会清理的问题
- [[#6465](https://github.com/apache/incubator-seata/pull/6465)] 修复2.0下saga模式的context replay丢失start问题
- [[#6469](https://github.com/apache/incubator-seata/pull/6469)] 修复在sqlserver数据库下[lock_table]数据表的插入操作sql中存在的错误

- [[#6497](https://github.com/apache/incubator-seata/pull/6497)] 修复自动装配时的seata tcc 配置类

### optimize:
- [[#6031](https://github.com/apache/incubator-seata/pull/6031)] 添加undo_log表的存在性校验
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.apache.seata.saga.engine.StateMachineConfig;
import org.apache.seata.spring.boot.autoconfigure.properties.SagaAsyncThreadPoolProperties;
import org.apache.seata.spring.boot.autoconfigure.properties.SeataProperties;
import org.apache.seata.spring.boot.autoconfigure.properties.SeataTccProperties;
import org.apache.seata.spring.boot.autoconfigure.properties.client.LoadBalanceProperties;
import org.apache.seata.spring.boot.autoconfigure.properties.client.LockProperties;
import org.apache.seata.spring.boot.autoconfigure.properties.client.RmProperties;
Expand All @@ -45,10 +46,10 @@
import static org.apache.seata.spring.boot.autoconfigure.StarterConstants.SEATA_PREFIX;
import static org.apache.seata.spring.boot.autoconfigure.StarterConstants.SERVICE_PREFIX;
import static org.apache.seata.spring.boot.autoconfigure.StarterConstants.TCC_FENCE_PREFIX;
import static org.apache.seata.spring.boot.autoconfigure.StarterConstants.TCC_PREFIX;
import static org.apache.seata.spring.boot.autoconfigure.StarterConstants.UNDO_PREFIX;



public class SeataClientEnvironmentPostProcessor implements EnvironmentPostProcessor, Ordered {

@Override
Expand All @@ -66,6 +67,7 @@ public void postProcessEnvironment(ConfigurableEnvironment environment, SpringAp
PROPERTY_BEAN_MAP.put(TCC_FENCE_PREFIX, SpringFenceConfig.class);
PROPERTY_BEAN_MAP.put(SAGA_STATE_MACHINE_PREFIX, StateMachineConfig.class);
PROPERTY_BEAN_MAP.put(SAGA_ASYNC_THREAD_POOL_PREFIX, SagaAsyncThreadPoolProperties.class);
PROPERTY_BEAN_MAP.put(TCC_PREFIX, SeataTccProperties.class);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* 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.spring.boot.autoconfigure.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import static org.apache.seata.spring.boot.autoconfigure.StarterConstants.TCC_PREFIX;

@Component
@ConfigurationProperties(prefix = TCC_PREFIX)
public class SeataTccProperties {
private String contextJsonParserType;

public String getContextJsonParserType() {
return contextJsonParserType;
}

public void setContextJsonParserType(String contextJsonParserType) {
this.contextJsonParserType = contextJsonParserType;
}
}
Loading