Skip to content

Commit 7b54347

Browse files
committed
License header and format
1 parent ec91145 commit 7b54347

File tree

9 files changed

+62
-17
lines changed

9 files changed

+62
-17
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2010-2019 the original author or authors.
4+
Copyright 2010-2020 the original author or authors.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.

src/main/java/org/mybatis/spring/SqlSessionFactoryBean.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/org/mybatis/spring/annotation/MapperScan.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,10 +32,10 @@
3232
* Use this annotation to register MyBatis mapper interfaces when using Java Config. It performs when same work as
3333
* {@link MapperScannerConfigurer} via {@link MapperScannerRegistrar}.
3434
*
35-
* <p>Either {@link #basePackageClasses} or {@link #basePackages} (or its alias
36-
* {@link #value}) may be specified to define specific packages to scan.
37-
* Since 2.0.4, If specific packages are not defined, scanning will occur from
38-
* the package of the class that declares this annotation.
35+
* <p>
36+
* Either {@link #basePackageClasses} or {@link #basePackages} (or its alias {@link #value}) may be specified to define
37+
* specific packages to scan. Since 2.0.4, If specific packages are not defined, scanning will occur from the package of
38+
* the class that declares this annotation.
3939
*
4040
* <p>
4141
* Configuration example:

src/main/java/org/mybatis/spring/annotation/MapperScannerRegistrar.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -70,11 +70,13 @@ public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, B
7070
AnnotationAttributes mapperScanAttrs = AnnotationAttributes
7171
.fromMap(importingClassMetadata.getAnnotationAttributes(MapperScan.class.getName()));
7272
if (mapperScanAttrs != null) {
73-
registerBeanDefinitions(importingClassMetadata, mapperScanAttrs, registry, generateBaseBeanName(importingClassMetadata, 0));
73+
registerBeanDefinitions(importingClassMetadata, mapperScanAttrs, registry,
74+
generateBaseBeanName(importingClassMetadata, 0));
7475
}
7576
}
7677

77-
void registerBeanDefinitions(AnnotationMetadata annoMeta, AnnotationAttributes annoAttrs, BeanDefinitionRegistry registry, String beanName) {
78+
void registerBeanDefinitions(AnnotationMetadata annoMeta, AnnotationAttributes annoAttrs,
79+
BeanDefinitionRegistry registry, String beanName) {
7880

7981
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(MapperScannerConfigurer.class);
8082
builder.addPropertyValue("processPropertyPlaceHolders", true);
@@ -158,7 +160,8 @@ public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, B
158160
if (mapperScansAttrs != null) {
159161
AnnotationAttributes[] annotations = mapperScansAttrs.getAnnotationArray("value");
160162
for (int i = 0; i < annotations.length; i++) {
161-
registerBeanDefinitions(importingClassMetadata, annotations[i], registry, generateBaseBeanName(importingClassMetadata, i));
163+
registerBeanDefinitions(importingClassMetadata, annotations[i], registry,
164+
generateBaseBeanName(importingClassMetadata, i));
162165
}
163166
}
164167
}

src/test/java/org/mybatis/spring/annotation/mapper/ds1/AppConfigWithDefaultMapperScanAndRepeat.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/**
2+
* Copyright 2010-2020 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package org.mybatis.spring.annotation.mapper.ds1;
217

318
import org.mybatis.spring.annotation.MapperScan;
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
1+
/**
2+
* Copyright 2010-2020 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package org.mybatis.spring.annotation.mapper.ds1;
217

318
import org.mybatis.spring.annotation.MapperScan;
419
import org.mybatis.spring.annotation.MapperScans;
520
import org.springframework.context.annotation.Configuration;
621

722
@Configuration
8-
@MapperScans({
9-
@MapperScan,
10-
@MapperScan("org.mybatis.spring.annotation.mapper.ds2")
11-
})
23+
@MapperScans({ @MapperScan, @MapperScan("org.mybatis.spring.annotation.mapper.ds2") })
1224
public class AppConfigWithDefaultMapperScans {
1325
}

src/test/java/org/mybatis/spring/mapper/AppConfigWithDefaultPackageScan.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/**
2+
* Copyright 2010-2020 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package org.mybatis.spring.mapper;
217

318
import org.mybatis.spring.annotation.MapperScan;

src/test/java/org/mybatis/spring/scan/package-info.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/test/java/org/mybatis/spring/type/package-info.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)