@@ -73,19 +73,6 @@ public void fooServiceWithInterfaceCglib() {
73
73
fooGetSimple (service );
74
74
}
75
75
76
- @ Test
77
- public void barServiceWithCacheableInterfaceCglib () {
78
- this .context = new AnnotationConfigApplicationContext (BarConfigCglib .class );
79
- BarService service = this .context .getBean (BarService .class );
80
- Cache cache = getCache ();
81
-
82
- Object key = new Object ();
83
- assertCacheMiss (key , cache );
84
-
85
- Object value = service .getSimple (key );
86
- assertCacheHit (key , value , cache );
87
- }
88
-
89
76
private void fooGetSimple (FooService service ) {
90
77
Cache cache = getCache ();
91
78
@@ -210,31 +197,6 @@ public Object getWithCondition(Object key) {
210
197
}
211
198
}
212
199
213
- @ Configuration
214
- @ Import (SharedConfig .class )
215
- @ EnableCaching (proxyTargetClass = true )
216
- static class BarConfigCglib {
217
-
218
- @ Bean
219
- public BarService barService () {
220
- return new BarServiceImpl ();
221
- }
222
- }
223
-
224
- interface BarService {
225
- @ Cacheable (cacheNames = "testCache" )
226
- Object getSimple (Object key );
227
- }
228
-
229
- static class BarServiceImpl implements BarService {
230
-
231
- private final AtomicLong counter = new AtomicLong ();
232
-
233
- @ Override
234
- public Object getSimple (Object key ) {
235
- return this .counter .getAndIncrement ();
236
- }
237
- }
238
200
239
201
@ Configuration
240
202
@ Import (SharedConfig .class )
0 commit comments