
# 开启horizon
1. 登录[AstroPro控制台](https://console.huaweicloud.com/astro-pro/?agencyId=dWjZiBgRMHefcJqMoL3bWlQAgEiGHcpQ/home)，单击"进入首页"，进入AstroPro实例。
2. 在左侧导航栏中，选择"后端开发平台 \> 服务管理 \> 服务"。
3. 在服务列表中，单击待操作服务"操作"列的"编辑"。 
   图1编辑服务   
   ![](https://support.huaweicloud.com/devg-astropro/zh-cn_image_0000002122423806.png "点击放大")
   
   
4. 在基本配置中，开启"是否启用扩展拦截"。 
   图2启用扩展拦截   
   ![](https://support.huaweicloud.com/devg-astropro/zh-cn_image_0000002157783613.png "点击放大")
   
   
5. "框架配置"、"生成策略"、"业务设计"和"服务依赖"按需配置。更多可参考[后端开发快速入门](https://support.huaweicloud.com/qs-astropro/astropro_02_0001.html)。
6. [生成服务代码](https://support.huaweicloud.com/usermanual-astropro/astropro_05_0020.html)后，打开本地压缩包，在"src/main/resources"路径下，查看在metadata.json文件，其中，generatorPolicy.enableRequestPlugin和generatorPolicy.enableResponsePlugin的属性值为true，表示已开启horizon功能。
   
   图3查看代码   
   ![](https://support.huaweicloud.com/devg-astropro/zh-cn_image_0000002157862013.png "点击放大")
   
   
 
