配置文件

Posted World_maker

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了配置文件相关的知识,希望对你有一定的参考价值。

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<!-- Application name -->
<dubbo:application name="dubbo-consumer" />
<dubbo:consumer check="false"></dubbo:consumer>
<dubbo:registry address="zookeeper://127.0.0.1:2181" />

<dubbo:reference id="demoService" interface="handpay.liuliang.demo.dubbo.service.DemoService" />
<dubbo:reference id="userService" interface="handpay.liuliang.demo.dubbo.service.UserService" />

</beans>

 

 

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:cache="http://www.springframework.org/schema/cache" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<!-- Application name -->
<dubbo:application name="dubbo-provider" />

<dubbo:registry address="zookeeper://127.0.0.1:2181" />

<dubbo:protocol name="dubbo" port="20880" />

<dubbo:service interface="handpay.liuliang.demo.dubbo.service.DemoService"
ref="demoServiceImpl"/>
<dubbo:service interface="handpay.liuliang.demo.dubbo.service.UserService"
ref="userServiceImpl" />
</beans>

以上是关于配置文件的主要内容,如果未能解决你的问题,请参考以下文章

springboot配置文件注解

springboot配置文件生成模板

Mybatis配置文件深入:核心配置文件和映射配置文件

springboot配置文件总结

JAVA零配置读取配置文件

Linux中各类程序的配置文件位置