Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Autowired
- TechnicianToStationRepository technicianToStationRepository;
- @RequestMapping("/staffing")
- @ResponseBody
- public String staffing()
- {
- ObjectMapper mapper1 = new ObjectMapper();
- TypeReference<TechnicianToStation> typeReferenceTechToStation = new TypeReference<TechnicianToStation>(){};
- InputStream inputStreamTechToStation = TypeReference.class.getResourceAsStream("/json/technicianToStationInfo.json");
- try {
- TechnicianToStation technicianToStationInfo = mapper1.readValue(inputStreamTechToStation,typeReferenceTechToStation);
- technicianToStationRepository.save(technicianToStationInfo);
- } catch (IOException e){
- System.out.println("Unable to save users: " + e.getMessage());
- }
Add Comment
Please, Sign In to add comment