Springboot references controller from another springboot project

under the same maven project, one of the springboot modules A refers to the Controller,An in the other springboot module B and calls the BMagia A project through inheritance. It can be run directly, but when packaging with maven, A module is prompted to find the inherited B module Controller.

what"s going on?

Dec.14,2021

the call of the controller layer can go to httpclient. It is not very clear about the problem you described


use feign

@EnableFeignClients
@FeignClient(value = "${appsweb.appis.name}", path = "${appsweb.appis.context-path}", configuration = FeignConfiguration.class)
public interface AlarmBaseInfoService {
        @RequestMapping(value = "/alarmBaseInfo/selectDetailByAlarmId", method = RequestMethod.POST, consumes="application/json")
        AjaxMessage<List<AlarmBaseInfo>> selectDetailByAlarmId(@RequestParam(value = "alarmID", required = false) String alarmID);
}

you can specify dependencies in the editor, but you can't find dependencies when packaging. You can set up the city maven father and son project, and you can pack it together. Also, package the B module into jar and rely on the A project

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b351e5-3431a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b351e5-3431a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?