В моем GeoLocationUpdateService.java:
Код: Выделить всё
@Autowired
private GeocoderService geocoderService;
...
geocoderService.findGeoLocation(...)
Код: Выделить всё
@Service
@CacheConfig(cacheNames = {"geoLocation"})
public class GeocoderService {
public GeoLocation findGeoLocation(GeoMap geoMap, String address, String postalCode, String countryCode) {...}
}
Код: Выделить всё
@Aspect
@Component
public class GeocoderServiceAspect {
@Around("execution(* com.myCompany.app.service.util.GeocoderService.findGeoLocation(..))")
public GeoLocation findGeoLocation(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {...}
}
Код: Выделить всё
@Configuration
@EnableSpringDataWebSupport
@EnableAspectJAutoProxy(proxyTargetClass = true)
@ComponentScan(basePackages = {"com.myCompany.app.*.web", "com.myCompany.app.service.util.*"})
@EnableAsync
public class WebMvcConfig extends WebMvcConfigurationSupport {...}
Метод findGeoLocation GeocoderServiceAspect.java не вызывается.
Подробнее здесь: https://stackoverflow.com/questions/798 ... not-called
Мобильная версия