Giter Site home page Giter Site logo

Comments (9)

areyouok avatar areyouok commented on June 14, 2024 1

我猜你的接口做javac编译的时候没有指定-parameters参数

from jetcache.

thetcc avatar thetcc commented on June 14, 2024

我猜你的接口做javac编译的时候没有指定-parameters参数

被你说中了,是没加。但@cached作用在实现类上是可以的,是不是作用在实现类上就不用加-parameters参数了。

from jetcache.

areyouok avatar areyouok commented on June 14, 2024

注解在接口上或者在类上都可以,但都需要-parameters参数,否则你编译出来的class文件里面没有参数名称,就无法工作了。

from jetcache.

thetcc avatar thetcc commented on June 14, 2024

注解在接口上或者在类上都可以,但都需要-parameters参数,否则你编译出来的class文件里面没有参数名称,就无法工作了。

我没加-parameters 时,如果注解作用在实现类上,缓存是正常工作的。只是加在接口上时无法生效。

from jetcache.

areyouok avatar areyouok commented on June 14, 2024

你的接口和实现类编译设置不一样吧,或者行参名称也可以不一样

from jetcache.

thetcc avatar thetcc commented on June 14, 2024

你的接口和实现类编译设置不一样吧,或者行参名称也可以不一样

一样的,我只是把注解挪了一个地方。其他没有任何改动。参数名称也是一样。

from jetcache.

areyouok avatar areyouok commented on June 14, 2024

那你得给出一个可以重现的案例了,要完整的,可运行的

from jetcache.

thetcc avatar thetcc commented on June 14, 2024

那你得给出一个可以重现的案例了,要完整的,可运行的

就是上面开头的例子,我在本地idea中运行,只要把注解从接口换到实现类,就能走缓存,命中缓存。

from jetcache.

areyouok avatar areyouok commented on June 14, 2024

那好吧,我认为没有问题。这个讨论就此结束了。

from jetcache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.