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

bugfix: impl of supportsSourceType is not defined #7104

Open
wants to merge 2 commits into
base: 2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Add changes here for all PR submitted to the 2.x branch.

### bugfix:

- [[#PR_NO](https://github.com/apache/incubator-seata/pull/#PR_NO)] fix XXX
- [[#7104](https://github.com/apache/incubator-seata/pull/7104)] fix impl of supportsSourceType is not defined


### optimize:

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 @@ -10,7 +10,7 @@

### bugfix:

- [[#PR_NO](https://github.com/apache/incubator-seata/pull/#PR_NO)] 修复XXX
- [[#7104](https://github.com/apache/incubator-seata/pull/7104)] 修复SeataApplicationListener在低版本springboot未实现supportsSourceType方法的问题

### optimize:

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package org.apache.seata.spring.boot.autoconfigure.loader;

import org.apache.seata.common.holder.ObjectHolder;
import org.apache.seata.common.util.CollectionUtils;
import org.apache.seata.common.util.StringUtils;
import org.apache.seata.config.ConfigurationFactory;
Expand Down Expand Up @@ -43,6 +44,7 @@
import static org.apache.seata.common.ConfigurationKeys.SERVER_PREFIX;
import static org.apache.seata.common.ConfigurationKeys.STORE_PREFIX;
import static org.apache.seata.common.ConfigurationKeys.TRANSPORT_PREFIX;
import static org.apache.seata.common.Constants.OBJECT_KEY_SPRING_CONFIGURABLE_ENVIRONMENT;

@Order(Ordered.HIGHEST_PRECEDENCE)
public class SeataPropertiesLoader implements ApplicationContextInitializer<ConfigurableApplicationContext> {
Expand All @@ -53,6 +55,10 @@ public class SeataPropertiesLoader implements ApplicationContextInitializer<Conf
@Override
public void initialize(ConfigurableApplicationContext applicationContext) {
ConfigurableEnvironment environment = applicationContext.getEnvironment();
if (ObjectHolder.INSTANCE.getObject(OBJECT_KEY_SPRING_CONFIGURABLE_ENVIRONMENT) == null) {
ObjectHolder.INSTANCE.setObject(OBJECT_KEY_SPRING_CONFIGURABLE_ENVIRONMENT,
applicationContext.getEnvironment());
}
FileConfiguration configuration = ConfigurationFactory.getOriginFileInstanceRegistry();
FileConfig fileConfig = configuration.getFileConfig();
Map<String, Object> configs = fileConfig.getAllConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,3 @@ org.apache.seata.spring.boot.autoconfigure.SeataCoreEnvironmentPostProcessor

org.springframework.context.ApplicationContextInitializer=\
org.apache.seata.spring.boot.autoconfigure.loader.SeataPropertiesLoader

org.springframework.context.ApplicationListener=\
org.apache.seata.spring.boot.autoconfigure.listener.SeataApplicationListener
Loading