when @RequestMapping used a static final constan in parent class which is not in same package with subClass class,the idea give me a error like
'V1_BASE_URL' has protected access in 'XXXXXXXX.BaseController'
so,i dont know why,the next is my code.
this is the parent class
package com.controller;
public class BaseController {
protected static final String V1_BASE_URL = "/crm/v1/";
}
this is subclass,and it is not in the same package with BaseController
package com.controller.corpus;
@RequestMapping(V1_BASE_URL+"/crm/v1/corpus_subset")
public class CorpusSubsetController extends BaseController {
}
i dont find some useful answer can deal my problem,but i found if the subclass and father in the same package,the annotation in classname can use static constant
,but if the subclass not in the same package with father, the annotation can not use,so my question is the annotation in classname belongs who?if the annotation in a class which one in the package A,so the annotation belongs the package A??