介面實作的 class 命名
Posted by Bruce Tsai
- 實作的類別命名需統一,可統一加上
impl
或統一不加,勿有部份使用impl
的情況
Facade
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class FourGUsedbytesSearchFacadeImpl
implements IFourGUsedbytesSearchFacade {
@Override
public FourGUsedBytes getFourGUsedbytesDataForMobile()
throws FailedResultException {
// code here
}
}
Controller
@Controller
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class FourGDataUsageController
implements IFourGDataUsageController {
@Override
@Action("dataUsage")
public String getFourGUsedbytesDataForMobile()
throws FailedResultException {
// code here
}
}