3 つのプロパティ ( companyTypes
、carrierLists
、およびcabinLevels
) をグローバル変数として初期化します。
@Controller
@RequestMapping("/backend/basic")
public class TicketRuleController {
@Autowired
private CarrierService carrierService;
@Autowired
private CabinLevelService cabinLevelService;
@Autowired
private CompanyTypeService companyTypeService;
private List<DTOCompanyType> companyTypes = companyTypeService.loadAllCompanyTypes();
private List<DTOCarrier> carrierLists = carrierService.loadAllCarriers();
private List<DTOCabinLevel> cabinLevels = cabinLevelService.loadAllCabinLevel();
...
}
これどうやってするの?