在service的service_hosp的pom文件中添加以下代码,即可解决跨域问题。
<dependencies>
<dependency>
<groupId>com.atguigu</groupId>
<artifactId>service-util</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>