File tree 1 file changed +5
-6
lines changed
org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/annotation
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 17
17
package org .springframework .orm .hibernate3 .annotation ;
18
18
19
19
import java .io .IOException ;
20
-
21
20
import javax .persistence .Embeddable ;
22
21
import javax .persistence .Entity ;
23
22
import javax .persistence .MappedSuperclass ;
78
77
*/
79
78
public class AnnotationSessionFactoryBean extends LocalSessionFactoryBean implements ResourceLoaderAware {
80
79
81
- private static final String RESOURCE_PATTERN = "**/*.class" ;
80
+ private static final String RESOURCE_PATTERN = "/ **/*.class" ;
82
81
83
82
84
83
private Class [] annotatedClasses ;
@@ -164,13 +163,13 @@ public void setResourceLoader(ResourceLoader resourceLoader) {
164
163
protected void postProcessMappings (Configuration config ) throws HibernateException {
165
164
AnnotationConfiguration annConfig = (AnnotationConfiguration ) config ;
166
165
if (this .annotatedClasses != null ) {
167
- for (int i = 0 ; i < this .annotatedClasses . length ; i ++ ) {
168
- annConfig .addAnnotatedClass (this . annotatedClasses [ i ] );
166
+ for (Class annotatedClass : this .annotatedClasses ) {
167
+ annConfig .addAnnotatedClass (annotatedClass );
169
168
}
170
169
}
171
170
if (this .annotatedPackages != null ) {
172
- for (int i = 0 ; i < this .annotatedPackages . length ; i ++ ) {
173
- annConfig .addPackage (this . annotatedPackages [ i ] );
171
+ for (String annotatedPackage : this .annotatedPackages ) {
172
+ annConfig .addPackage (annotatedPackage );
174
173
}
175
174
}
176
175
scanPackages (annConfig );
You can’t perform that action at this time.
0 commit comments