Skip to content

Commit

Permalink
同步代码.
Browse files Browse the repository at this point in the history
  • Loading branch information
nieqiurong committed Oct 10, 2023
1 parent 97d6bf8 commit d1beedf
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
* 继承至MapperRegistry
Expand All @@ -35,7 +35,8 @@
public class MybatisMapperRegistry extends MapperRegistry {

private final Configuration config;
private final Map<Class<?>, MybatisMapperProxyFactory<?>> knownMappers = new HashMap<>();

private final Map<Class<?>, MybatisMapperProxyFactory<?>> knownMappers = new ConcurrentHashMap<>();

public MybatisMapperRegistry(Configuration config) {
super(config);
Expand Down Expand Up @@ -108,4 +109,5 @@ public <T> void addMapper(Class<T> type) {
public Collection<Class<?>> getMappers() {
return Collections.unmodifiableCollection(knownMappers.keySet());
}

}

0 comments on commit d1beedf

Please sign in to comment.