I have an SpringBoot 2.1.4.RELEASE app. with a repository:
@Repository
public interface PercentageAlertXMenuRepository extends CrudRepository<PercentageAlertXMenu, Long> {
@Cacheable("percentageAlertXMenu", unless="#result == null")
PercentageAlertXMenu findByPercentageAlertAndMenu (MenuPercentageAlert percentageAlert, Menu Menu);
but I got a compilation error:
Syntax error on token ""percentageAlertXMenu"", invalid
MemberValuePairs
You need to use the value
attribute of the annotation:
@Cacheable(value="percentageAlertXMenu", unless="#result == null")