This repository was archived by the owner on Dec 15, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +213
-0
lines changed
main/java/com/qatarlyst/springproblem
test/java/com/qatarlyst/springproblem Expand file tree Collapse file tree 7 files changed +213
-0
lines changed Original file line number Diff line number Diff line change 1+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
2+ <modelVersion >4.0.0</modelVersion >
3+ <groupId >org.springframework.issues</groupId >
4+ <artifactId >SPR-9031</artifactId >
5+ <version >1.0.0-SNAPSHOT</version >
6+ <dependencies >
7+ <dependency >
8+ <groupId >org.springframework</groupId >
9+ <artifactId >spring-context</artifactId >
10+ <version >3.1.0.RELEASE</version >
11+ </dependency >
12+ <dependency >
13+ <groupId >junit</groupId >
14+ <artifactId >junit</artifactId >
15+ <version >4.9</version >
16+ <scope >test</scope >
17+ </dependency >
18+ <dependency >
19+ <groupId >cglib</groupId >
20+ <artifactId >cglib</artifactId >
21+ <version >2.2.2</version >
22+ </dependency >
23+ </dependencies >
24+ </project >
Original file line number Diff line number Diff line change 1+ /**
2+ *
3+ * -----------------------------------------------------------------------
4+ *
5+ * QATARLYST LIMITED
6+ *
7+ * -----------------------------------------------------------------------
8+ *
9+ * (C) Copyright 2012 Qatarlyst Limited. All rights reserved.
10+ *
11+ * NOTICE: All information contained herein or attendant hereto is,
12+ * and remains, the property of Qatarlyst Limited. Many of the
13+ * intellectual and technical concepts contained herein are
14+ * proprietary to Qatarlyst Limited. Any dissemination of this
15+ * information or reproduction of this material is strictly
16+ * forbidden unless prior written permission is obtained
17+ * from Qatarlyst Limited.
18+ *
19+ * -----------------------------------------------------------------------
20+ *
21+ */
22+ package com .qatarlyst .springproblem ;
23+
24+ import org .springframework .context .annotation .Configuration ;
25+ import org .springframework .context .annotation .Import ;
26+
27+ @ Configuration
28+ @ Import (LowLevelContext .class )
29+ public class HighLevelContext {}
Original file line number Diff line number Diff line change 1+ /**
2+ *
3+ * -----------------------------------------------------------------------
4+ *
5+ * QATARLYST LIMITED
6+ *
7+ * -----------------------------------------------------------------------
8+ *
9+ * (C) Copyright 2012 Qatarlyst Limited. All rights reserved.
10+ *
11+ * NOTICE: All information contained herein or attendant hereto is,
12+ * and remains, the property of Qatarlyst Limited. Many of the
13+ * intellectual and technical concepts contained herein are
14+ * proprietary to Qatarlyst Limited. Any dissemination of this
15+ * information or reproduction of this material is strictly
16+ * forbidden unless prior written permission is obtained
17+ * from Qatarlyst Limited.
18+ *
19+ * -----------------------------------------------------------------------
20+ *
21+ */
22+ package com .qatarlyst .springproblem ;
23+
24+ import org .springframework .beans .factory .annotation .Autowired ;
25+ import org .springframework .context .annotation .ComponentScan ;
26+ import org .springframework .context .annotation .ComponentScan .Filter ;
27+ import org .springframework .context .annotation .Configuration ;
28+ import com .qatarlyst .springproblem .scanpackage .Component ;
29+
30+ @ Configuration
31+ @ ComponentScan (value = { "com.qatarlyst.springproblem.scanpackage" }, includeFilters = { @ Filter (MarkerAnnotation .class ) })
32+ public class LowLevelContext {
33+ @ Autowired private Component component ;
34+
35+ }
Original file line number Diff line number Diff line change 1+ /**
2+ *
3+ * -----------------------------------------------------------------------
4+ *
5+ * QATARLYST LIMITED
6+ *
7+ * -----------------------------------------------------------------------
8+ *
9+ * (C) Copyright 2012 Qatarlyst Limited. All rights reserved.
10+ *
11+ * NOTICE: All information contained herein or attendant hereto is,
12+ * and remains, the property of Qatarlyst Limited. Many of the
13+ * intellectual and technical concepts contained herein are
14+ * proprietary to Qatarlyst Limited. Any dissemination of this
15+ * information or reproduction of this material is strictly
16+ * forbidden unless prior written permission is obtained
17+ * from Qatarlyst Limited.
18+ *
19+ * -----------------------------------------------------------------------
20+ *
21+ */
22+ package com .qatarlyst .springproblem ;
23+
24+ public @interface MarkerAnnotation {}
Original file line number Diff line number Diff line change 1+ /**
2+ *
3+ * -----------------------------------------------------------------------
4+ *
5+ * QATARLYST LIMITED
6+ *
7+ * -----------------------------------------------------------------------
8+ *
9+ * (C) Copyright 2012 Qatarlyst Limited. All rights reserved.
10+ *
11+ * NOTICE: All information contained herein or attendant hereto is,
12+ * and remains, the property of Qatarlyst Limited. Many of the
13+ * intellectual and technical concepts contained herein are
14+ * proprietary to Qatarlyst Limited. Any dissemination of this
15+ * information or reproduction of this material is strictly
16+ * forbidden unless prior written permission is obtained
17+ * from Qatarlyst Limited.
18+ *
19+ * -----------------------------------------------------------------------
20+ *
21+ */
22+ package com .qatarlyst .springproblem .scanpackage ;
23+
24+ import com .qatarlyst .springproblem .MarkerAnnotation ;
25+
26+ @ MarkerAnnotation
27+ public class Component {
28+
29+ }
Original file line number Diff line number Diff line change 1+ /**
2+ *
3+ * -----------------------------------------------------------------------
4+ *
5+ * QATARLYST LIMITED
6+ *
7+ * -----------------------------------------------------------------------
8+ *
9+ * (C) Copyright 2012 Qatarlyst Limited. All rights reserved.
10+ *
11+ * NOTICE: All information contained herein or attendant hereto is,
12+ * and remains, the property of Qatarlyst Limited. Many of the
13+ * intellectual and technical concepts contained herein are
14+ * proprietary to Qatarlyst Limited. Any dissemination of this
15+ * information or reproduction of this material is strictly
16+ * forbidden unless prior written permission is obtained
17+ * from Qatarlyst Limited.
18+ *
19+ * -----------------------------------------------------------------------
20+ *
21+ */
22+ package com .qatarlyst .springproblem ;
23+
24+ import org .junit .Test ;
25+ import org .springframework .context .annotation .AnnotationConfigApplicationContext ;
26+
27+ public class HighLevelContextTest {
28+
29+ @ Test
30+ public void contextBuilds () {
31+ AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext ();
32+ ctx .register (HighLevelContext .class );
33+ ctx .refresh ();
34+ }
35+
36+ }
Original file line number Diff line number Diff line change 1+ /**
2+ *
3+ * -----------------------------------------------------------------------
4+ *
5+ * QATARLYST LIMITED
6+ *
7+ * -----------------------------------------------------------------------
8+ *
9+ * (C) Copyright 2012 Qatarlyst Limited. All rights reserved.
10+ *
11+ * NOTICE: All information contained herein or attendant hereto is,
12+ * and remains, the property of Qatarlyst Limited. Many of the
13+ * intellectual and technical concepts contained herein are
14+ * proprietary to Qatarlyst Limited. Any dissemination of this
15+ * information or reproduction of this material is strictly
16+ * forbidden unless prior written permission is obtained
17+ * from Qatarlyst Limited.
18+ *
19+ * -----------------------------------------------------------------------
20+ *
21+ */
22+ package com .qatarlyst .springproblem ;
23+
24+ import org .junit .Test ;
25+ import org .springframework .context .annotation .AnnotationConfigApplicationContext ;
26+
27+ public class LowLevelContextTest {
28+
29+ @ Test
30+ public void contextBuilds () {
31+ AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext ();
32+ ctx .register (LowLevelContext .class );
33+ ctx .refresh ();
34+ }
35+
36+ }
You can’t perform that action at this time.
0 commit comments