dubbo消费者使用注解及shiro整合

本文介绍如何在Shiro安全框架中整合Dubbo服务,包括配置文件与注解方式的区别,提供了具体的代码示例与配置说明。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

shiro和dubbo整合时不能dubbo消费者不能使用注解的方式,不然会报错

@Reference//导入dubbo的包

 private TestDubboService testDubboService;

 import com.alibaba.dubbo.config.annotation.Service;
@Service
public class TestDubboServiceImpl implements TestDubboService {
提供者实现dubbo接口并加入@Service注解,dubbo的Service注解

消费者service层的@Service注解还是要的,不然放不进去Spring容器,你用component也行

消费者这边引入shrio的话,就要用配置文件配置,而且要用@Autowired注入dubbo接口


dubbo消费者使用注解方式

dubbo-consumer.xml<?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:dubbo="http://code.alibabatech.com/schema/dubbo"	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">    <dubbo:application name="xxxx-manager"/>    <dubbo:registry address="zookeeper://127.0.0.1:2181?backup=127.0.0.1:2182,127.0.0.1:2183" /> 	 	<!-- check参数,不检查提供者是否存在 -->	<!--<dubbo:reference check="false" id="testDubboService" interface="com.****.manage.service.testDubboService" timeout="10000"/>-->    <!--<dubbo:reference check="false" id="dubboCartService" interface="com.jt.dubbo.cart.DubboCartService" timeout="10000"/>	<dubbo:reference check="false" id="dubboxOrderService" interface="com.jt.dubbo.order.DubboxOrderService" timeout="10000"/>-->	<dubbo:annotation package="com.****" /></beans>
springmvc-config.xml
<?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:p="http://www.springframework.org/schema/p"	xmlns:context="http://www.springframework.org/schema/context"	xmlns:mvc="http://www.springframework.org/schema/mvc"	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">	<!-- MVC注解驱动 -->	<mvc:annotation-driven/>		<!-- 配置扫描器,使得@Controller注解生效 -->	<context:component-scan base-package="com.*****" />	<!-- 定义视图解析器 -->	<!-- prefix="/WEB-INF/jsp/", suffix=".jsp", viewname="test" -> "/WEB-INF/jsp/test.jsp" -->	<!--<bean		class="org.springframework.web.servlet.view.InternalResourceViewResolver">		&lt;!&ndash; 前缀 &ndash;&gt;		<property name="prefix" value="/WEB-INF/views/" />		&lt;!&ndash; 后缀 &ndash;&gt;		<property name="suffix" value=".htm" />	</bean>-->	<!-- use thymeleaf  -->	<bean id="templateResolver"		  class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">		<property name="prefix" value="/WEB-INF/thymeleaf/" />		<property name="suffix" value=".html" />		<property name="templateMode" value="HTML5" />		<!-- Template cache is set to false (default is true).        -->		<property name="cacheable" value="false" />		<property name="characterEncoding" value="UTF-8"/>	</bean>	<bean id="templateEngine" class="org.thymeleaf.spring3.SpringTemplateEngine">		<property name="templateResolver" ref="templateResolver" />	</bean>	<!--    - The ContentNegotiatingViewResolver delegates to the InternalResourceViewResolver and BeanNameViewResolver,    - and uses the requested media type (determined by the path extension) to pick a matching view.    - When the media type is 'text/html', it will delegate to the InternalResourceViewResolver's JstlView,    - otherwise to the BeanNameViewResolver.    -->	<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">		<property name="contentNegotiationManager" ref="cnManager"/>		<property name="viewResolvers">			<list>				<!-- Used here for 'xml' and 'atom' views  -->				<bean class="org.springframework.web.servlet.view.BeanNameViewResolver">					<property name="order" value="1"/>				</bean>				<bean class="org.thymeleaf.spring3.view.ThymeleafViewResolver">					<property name="templateEngine" ref="templateEngine" />					<property name="characterEncoding" value="UTF-8"/>					<property name="order" value="2"/>					<!-- We need to set exclusions because Content Negotiation tries to resolve from -->					<!-- Thymeleaf even if a specific view bean (of a different class) is already    -->					<!-- found, which might cause exceptions (e.g. ThymeleafView does not have a     -->					<!-- 'marshaller' property).                                                     -->					<property name="excludedViewNames" value="*.xml" />				</bean>				<!-- Default viewClass: JSTL view (JSP with html output)-->				<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
			
		<property name="prefix" value="/views/"/>					<property name="suffix" value=".jsp"/>					<property name="order" value="3"/>
				</bean>			</list>		</property>	</bean>
	<!-- Simple strategy: only path extension is taken into account -->	<bean id="cnManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">		<property name="favorPathExtension" value="true"/>		<property name="ignoreAcceptHeader" value="true"/>		<property name="defaultContentType" value="text/html"/>		<property name="mediaTypes">			<map>
				<entry key="html" value="text/html" />				<entry key="xml" value="application/xml" />				<entry key="atom" value="application/atom+xml" />			</map>		</property>
	</bean>	<!-- 处理静态资源被“/”所拦截的问题 -->	<mvc:default-servlet-handler />	<import resource="classpath:config/dubbo-consumer.xml"/>	<!--&lt;!&ndash; 配置购物车的拦截器 &ndash;&gt;	<mvc:interceptors>		<mvc:interceptor>			<mvc:mapping path="/cart/**"/>			<bean class="com.jt.web.interceptor.CartInterceptor"/>		</mvc:interceptor>	</mvc:interceptors>--></beans>
TestService.java
package com.****.service;import com.alibaba.dubbo.config.annotation.Reference;import com.***.dubbo.service.TestDubboService;import com.****.dubbo.vo.User;import org.springframework.stereotype.Service;/** * @author zrhong * @date 2018/2/28 12:02 * @description **/@Servicepublic class TestService {    @Reference    private TestDubboService testDubboService;    public User test(){        return testDubboService.test();    }}
TestController.java
package com.****.controller;import com.****.dubbo.vo.User;import com.******.service.TestService;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.springframework.web.bind.annotation.RequestMapping;/** * @author zrhong * @date 2018/2/28 12:01 * @description **/@Controllerpublic class TestController {    @Autowired    private TestService testService;    @RequestMapping("test")    public String test(Model model) {        User user = testService.test();        model.addAttribute("user",user);        return "test";    }}


 
web.xml
<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"         xmlns="http://java.sun.com/xml/ns/javaee"         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"         id="jt-manage" version="2.5">    <display-name>xxx-manager</display-name>    <context-param>        <param-name>contextConfigLocation</param-name>        <param-value>classpath:config/applicationContext*.xml</param-value>    </context-param>    <!--Spring的ApplicationContext 载入 -->    <listener>        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>    </listener>    <!-- 编码过滤器,以UTF8编码 -->    <filter>        <filter-name>encodingFilter</filter-name>        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>        <init-param>            <param-name>encoding</param-name>            <param-value>UTF8</param-value>        </init-param>    </filter>    <filter-mapping>        <filter-name>encodingFilter</filter-name>        <url-pattern>/*</url-pattern>    </filter-mapping>    <!-- 配置SpringMVC -->    <servlet>        <servlet-name>springmvc-web</servlet-name>        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>        <!-- 指定SpringMVC配置文件 -->        <init-param>            <param-name>contextConfigLocation</param-name>            <param-value>classpath:config/springmvc-config.xml</param-value>        </init-param>        <load-on-startup>1</load-on-startup>    </servlet>    <servlet-mapping>        <servlet-name>springmvc-web</servlet-name>        <url-pattern>*.html</url-pattern>    </servlet-mapping>    <!-- 防止springMVC框架返回json时和html冲突报 406 错误 -->    <servlet-mapping>        <servlet-name>springmvc-web</servlet-name>        <url-pattern>/service/*</url-pattern>    </servlet-mapping>    <servlet>        <servlet-name>ImageServlet</servlet-name>        <servlet-class>com.****.common.ImageServlet</servlet-class>    </servlet>    <servlet-mapping>        <servlet-name>ImageServlet</servlet-name>        <url-pattern>/imageServlet/*</url-pattern>    </servlet-mapping>    <welcome-file-list>        <welcome-file>index.html</welcome-file>        <welcome-file>index.jsp</welcome-file>    </welcome-file-list></web-app>

pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">    <parent>        <artifactId>xxxx-parent</artifactId>        <groupId>com.****</groupId>        <version>1.0-SNAPSHOT</version>    </parent>    <modelVersion>4.0.0</modelVersion>    <artifactId>manager</artifactId>    <packaging>war</packaging>    <name>xxxxx-manager</name>    <url>http://maven.apache.org</url>    <build>        <outputDirectory>${basedir}/WebRoot/WEB-INF/classes</outputDirectory>        <resources>            <resource>                <directory>src/main/resources</directory>                <filtering>true</filtering>                <includes>                    <include>*.xml</include>                </includes>            </resource>            <resource>                <directory>src/main/resources/config</directory>                <targetPath>config</targetPath>                <includes>                    <include>*.xml</include>                </includes>            </resource>            <resource>                <directory>src/main/resources/config/${env}</directory>                <targetPath>config</targetPath>            </resource>            <resource>                <directory>../config/${env}</directory>                <targetPath>config</targetPath>                <includes>                    <include>ice.properties</include>                    <include>jedis.properties</include>                    <include>kafka.properties</include>                    <include>dubbo-consumer.xml</include>                </includes>            </resource>            <resource>                <directory>../config</directory>                <targetPath>config</targetPath>                <includes>                    <include>dubbo-consumer.xml</include>                </includes>            </resource>        </resources>        <plugins>            <plugin>                <artifactId>maven-war-plugin</artifactId>                <version>2.6</version>                <configuration>                    <warName>xxxx_manager</warName>                </configuration>            </plugin>            <plugin>                <artifactId>maven-dependency-plugin</artifactId>            </plugin>        </plugins>    </build>    <dependencies>        <dependency>            <groupId>javax.servlet</groupId>            <artifactId>javax.servlet-api</artifactId>            <version>3.0.1</version>            <scope>provided</scope>        </dependency>        <dependency>            <groupId>org.apache.zookeeper</groupId>            <artifactId>zookeeper</artifactId>            <version>3.4.8</version>        </dependency>        <dependency>            <groupId>com.*****</groupId>            <artifactId>xxxx-common</artifactId>            <version>1.0-SNAPSHOT</version>        </dependency>        <!--<dependency>            <groupId>com.alibaba</groupId>            <artifactId>dubbo</artifactId>            <version>2.5.3</version>        </dependency>-->        <dependency>            <groupId>com.*****</groupId>            <artifactId>xxxx-dubbo</artifactId>            <version>1.0-SNAPSHOT</version>        </dependency>        <dependency>            <groupId>javax.servlet</groupId>            <artifactId>javax.servlet-api</artifactId>            <version>3.0.1</version>            <scope>provided</scope>        </dependency>        <dependency>            <groupId>org.apache.zookeeper</groupId>            <artifactId>zookeeper</artifactId>            <version>3.4.7</version>        </dependency>        <dependency>            <groupId>com.github.abel533</groupId>            <artifactId>mapper</artifactId>            <version>2.3.2</version>        </dependency>        <dependency>            <groupId>javax.validation</groupId>            <artifactId>validation-api</artifactId>            <version>1.1.0.Final</version>        </dependency>        <dependency>            <groupId>org.jboss.resteasy</groupId>            <artifactId>resteasy-jaxrs</artifactId>            <version>3.0.7.Final</version>        </dependency>        <!-- thymeleaf-spring4 -->        <!-- https://mvnrepository.com/artifact/org.unbescape/unbescape -->        <dependency>            <groupId>org.unbescape</groupId>            <artifactId>unbescape</artifactId>            <version>1.0</version>        </dependency>        <dependency>            <groupId>org.attoparser</groupId>            <artifactId>attoparser</artifactId>            <version>1.1</version>        </dependency>        <dependency>            <groupId>org.thymeleaf</groupId>            <artifactId>thymeleaf</artifactId>            <version>2.1.3.RELEASE</version>        </dependency>        <dependency>            <groupId>org.thymeleaf</groupId>            <artifactId>thymeleaf-spring3</artifactId>            <version>2.1.3.RELEASE</version>        </dependency>    </dependencies></project>

===========================================================================


==========================================================================


==========================================================================


服务层:

pom.xml<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0"         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">    <parent>        <artifactId>xxxx-parent</artifactId>        <groupId>com.*****</groupId>        <version>1.0-SNAPSHOT</version>    </parent>    <modelVersion>4.0.0</modelVersion>    <artifactId>boss</artifactId>    <build>        <finalName>${artifactId}-${version}-${maven.build.timestamp}</finalName>        <resources>            <resource>                <directory>src/main/resources</directory>                <filtering>true</filtering>                <includes>                    <include>*.xml</include>                    <include>mappers/*</include>                </includes>            </resource>            <resource>                <directory>src/main/resources/config</directory>                <filtering>false</filtering>                <targetPath>config</targetPath>                <includes>                    <include>*.xml</include>                </includes>            </resource>            <resource>                <directory>src/main/resources/config/${env}</directory>                <targetPath>config</targetPath>            </resource>            <resource>                <directory>../config/${env}</directory>                <targetPath>config</targetPath>            </resource>        </resources>        <testResources>            <testResource>                <directory>src/test/resources</directory>                <filtering>true</filtering>                <includes>                    <include>*.properties</include>                </includes>            </testResource>        </testResources>        <plugins>            <plugin>                <artifactId>maven-dependency-plugin</artifactId>                <executions>                    <execution>                        <id>copy-dependencies</id>                        <phase>package</phase>                        <goals>                            <goal>copy-dependencies</goal>                        </goals>                        <configuration>                            <outputDirectory>${build.directory}/lib</outputDirectory>                            <overWriteReleases>true</overWriteReleases>                            <overWriteSnapshots>true</overWriteSnapshots>                        </configuration>                    </execution>                </executions>            </plugin>            <plugin>                <artifactId>maven-jar-plugin</artifactId>                <configuration>                    <archive>                        <manifest>                            <addClasspath>true</addClasspath>                            <mainClass>com.******.init.Server</mainClass>                            <classpathPrefix>lib</classpathPrefix>                        </manifest>                    </archive>                    <excludes>                        <exclude>config/applicationContext*.xml</exclude>                    </excludes>                </configuration>            </plugin>        </plugins>    </build>    <dependencies>        <dependency>            <groupId>com.*****</groupId>            <artifactId>xxxx-common</artifactId>            <version>1.0-SNAPSHOT</version>        </dependency>        <dependency>            <groupId>com.******</groupId>            <artifactId>xxxx-dubbo</artifactId>            <version>1.0-SNAPSHOT</version>        </dependency>        <dependency>            <groupId>javax.servlet</groupId>            <artifactId>javax.servlet-api</artifactId>            <version>3.0.1</version>            <scope>provided</scope>        </dependency>        <dependency>            <groupId>org.apache.zookeeper</groupId>            <artifactId>zookeeper</artifactId>            <version>3.4.8</version>        </dependency>        <dependency>            <groupId>com.github.abel533</groupId>            <artifactId>mapper</artifactId>            <version>2.3.2</version>        </dependency>        <dependency>            <groupId>javax.validation</groupId>            <artifactId>validation-api</artifactId>            <version>1.1.0.Final</version>        </dependency>    </dependencies></project>
提供者:applicationContext-provider.xml
<?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:dubbo="http://code.alibabatech.com/schema/dubbo"	xsi:schemaLocation="http://www.springframework.org/schema/beans 	http://www.springframework.org/schema/beans/spring-beans-2.5.xsd	http://code.alibabatech.com/schema/dubbo 	http://code.alibabatech.com/schema/dubbo/dubbo.xsd">	<!-- name:用于注册中心计算应用间依赖关系;消费者和提供者应用名称不要一样,此参数不是匹配条件;项目叫什么就填什么 -->	<!-- owner:应用负责人,用于服务治理,请填写负责人公司邮箱前缀 -->	<dubbo:application name="boss" />	<!-- 使用zookeeper注册中心暴露服务地址 -->	<dubbo:registry address="zookeeper://127.0.0.1:2181?backup=127.0.0.1:2182,127.0.0.1:2183" />	<!-- 用dubbo协议在20880端口暴露服务 -->	<dubbo:protocol name="dubbo" port="20880" />		<!-- 如果ID不填,缺省和name属性值一样,重复则在name后加序号。 -->	<!-- port:dubbo协议缺省端口为20880,rmi协议缺省端口为1099,http和hessian协议缺省端口为80  -->	<!-- threadpool:默认fixed -->	<!-- threads:服务线程池大小 -->	<!-- accepts:服务提供方最大可接受连接数 -->	<!-- payload:请求及响应数据包大小限制,单位:字节;默认是8M -->	<!-- dubbo:protocol name="rest" threads="500" port="8084" contextpath="/" server="servlet" accepts="500"		extension="com.alibaba.dubbo.rpc.protocol.rest.support.LoggingFilter" /-->		<!-- 	 <dubbo:annotation package="com.jt.dubbo.cart.rest.service.impl" /> 	--> 		<!-- 声明需要暴露的服务接口 -->	<!--<dubbo:service interface="com.*****.manage.service.testDubboService" ref="testDubboService" />		<bean id="testDubboService" class="com.****.test.testDubboServiceImpl"/>-->	<dubbo:annotation package="com.*****" /></beans>
TestDubboServiceImpl.java
package com.*****.serviceImpl;import com.alibaba.dubbo.config.annotation.Service;import com.****.dubbo.service.TestDubboService;import com.****.dubbo.vo.User;import org.springframework.beans.factory.annotation.Autowired;/** * @author zrhong * @date 2018/2/28 14:04 * @description **/@Servicepublic class TestDubboServiceImpl implements TestDubboService {    @Autowired    private TestService testService;    @Override    public User test() {        User user = testService.test("1");        return user;    }}
TestService.java
package com.*****.serviceImpl;import com.****.dubbo.vo.User;import com.******.mapper.TestMapper;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.beans.factory.annotation.Qualifier;import org.springframework.stereotype.Service;/** * @author zrhong * @date 2018/3/3 12:57 * @description **/@Servicepublic class TestService {    @Autowired    @Qualifier("testMapper")    private TestMapper testMapper;    public User test(String id) {        return testMapper.test("1");    }}
====================================================================

====================================================================

====================================================================

父pom

<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0"         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">    <modelVersion>4.0.0</modelVersion>    <groupId>com.****</groupId>    <artifactId>xxxx-parent</artifactId>    <packaging>pom</packaging>    <version>1.0-SNAPSHOT</version>    <modules>        <module>common</module>        <module>dubbo</module>        <module>web</module>        <module>boss</module>        <module>manage</module>        <module>manager</module>    </modules>    <!--Spring版本定义-->    <properties>        <spring.version>4.2.0.RELEASE</spring.version>        <maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>    </properties>    <!--版本定义-->    <profiles>        <!--测试环境-->        <profile>            <id>develop</id>            <properties>                <env>develop</env>            </properties>            <activation>                <activeByDefault>true</activeByDefault>            </activation>        </profile>        <!--本地环境-->        <profile>            <id>local</id>            <properties>                <env>local</env>            </properties>        </profile>        <!--生产环境-->        <profile>            <id>production</id>            <properties>                <env>production</env>            </properties>        </profile>    </profiles>    <build>        <plugins>            <plugin>                <groupId>org.apache.maven.plugins</groupId>                <artifactId>maven-compiler-plugin</artifactId>                <version>3.5.1</version>                <configuration>                    <source>1.7</source>                    <target>1.7</target>                    <encoding>utf-8</encoding>                </configuration>            </plugin>           <!-- &lt;!&ndash;自动生成代码引入插件&ndash;&gt;            <plugin>                <groupId>org.mybatis.generator</groupId>                <artifactId>mybatis-generator-maven-plugin</artifactId>                <version>1.3.2</version>                <configuration>                    <verbose>true</verbose>                    <overwrite>true</overwrite>                </configuration>            </plugin>-->        </plugins>    </build>    <dependencies>        <!--上传组件引入-->        <dependency>            <groupId>commons-fileupload</groupId>            <artifactId>commons-fileupload</artifactId>            <version>1.2.2</version>        </dependency>        <dependency>            <groupId>javax.servlet</groupId>            <artifactId>javax.servlet-api</artifactId>            <version>3.1.0</version>        </dependency>        <!-- Spring -->        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-context</artifactId>            <version>${spring.version}</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-beans</artifactId>            <version>${spring.version}</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-webmvc</artifactId>            <version>${spring.version}</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-jdbc</artifactId>            <version>${spring.version}</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-aspects</artifactId>            <version>${spring.version}</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-core</artifactId>            <version>${spring.version}</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-aop</artifactId>            <version>${spring.version}</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-web</artifactId>            <version>${spring.version}</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-expression</artifactId>            <version>${spring.version}</version>        </dependency>        <!--mybatis与Spring引入-->        <dependency>            <groupId>org.mybatis</groupId>            <artifactId>mybatis-spring</artifactId>            <version>1.3.1</version>        </dependency>        <!--mybatis引入-->        <dependency>            <groupId>org.mybatis</groupId>            <artifactId>mybatis</artifactId>            <version>3.4.5</version>        </dependency>        <!--Spring jdbc引入-->        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-jdbc</artifactId>            <version>${spring.version}</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-context</artifactId>            <version>${spring.version}</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-context-support</artifactId>            <version>${spring.version}</version>        </dependency>        <!--Spring事务-->        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-tx</artifactId>            <version>${spring.version}</version>        </dependency>        <!--数据源引入-->        <dependency>            <groupId>com.alibaba</groupId>            <artifactId>druid</artifactId>            <version>1.0.20</version>        </dependency>        <!--gson引入-->        <dependency>            <groupId>com.google.code.gson</groupId>            <artifactId>gson</artifactId>            <version>2.8.0</version>        </dependency>        <!--模板扩展-->        <dependency>            <groupId>com.googlecode.rapid-framework</groupId>            <artifactId>rapid-core</artifactId>            <version>4.0.5</version>        </dependency>        <!-- lang包 缺少的话可能会报错  -->        <dependency>            <groupId>commons-lang</groupId>            <artifactId>commons-lang</artifactId>            <version>2.6</version>        </dependency>        <!--httpclient引入-->        <dependency>            <groupId>org.apache.httpcomponents</groupId>            <artifactId>httpclient</artifactId>            <version>4.4.1</version>        </dependency>        <dependency>            <groupId>net.sf.json-lib</groupId>            <artifactId>json-lib</artifactId>            <version>2.4</version>            <classifier>jdk15</classifier>        </dependency>        <!--quartz定时器引入-->        <dependency>            <groupId>org.quartz-scheduler</groupId>            <artifactId>quartz</artifactId>            <version>2.2.2</version>        </dependency>        <!--oracle数据库引入-->        <dependency>            <groupId>com.oracle</groupId>            <artifactId>ojdbj6</artifactId>            <version>11.2.0.4</version>        </dependency>        <!-- Jackson Json处理工具包 -->        <dependency>            <groupId>com.fasterxml.jackson.core</groupId>            <artifactId>jackson-databind</artifactId>            <version>2.7.5</version>        </dependency>        <!--分页插件引入-->        <dependency>            <groupId>com.github.pagehelper</groupId>            <artifactId>pagehelper</artifactId>            <version>4.1.6</version>        </dependency>        <dependency>            <groupId>com.github.jsqlparser</groupId>            <artifactId>jsqlparser</artifactId>            <version>0.9.1</version>        </dependency>        <!--json转对象-->        <dependency>            <groupId>com.alibaba</groupId>            <artifactId>fastjson</artifactId>            <version>1.2.15</version>        </dependency>        <dependency>            <groupId>redis.clients</groupId>            <artifactId>jedis</artifactId>            <version>2.8.1</version>        </dependency>        <dependency>            <groupId>org.apache.commons</groupId>            <artifactId>commons-lang3</artifactId>            <version>3.1</version>        </dependency>        <dependency>            <groupId>commons-lang</groupId>            <artifactId>commons-lang</artifactId>            <version>2.5</version>        </dependency>        <dependency>            <groupId>org.apache.commons</groupId>            <artifactId>commons-jexl3</artifactId>            <version>3.1</version>        </dependency>        <dependency>            <groupId>net.sourceforge.jexcelapi</groupId>            <artifactId>jxl</artifactId>            <version>2.6.12</version>        </dependency>        <!--通用mapper-->        <dependency>            <groupId>com.github.abel533</groupId>            <artifactId>mapper</artifactId>            <version>2.3.2</version>        </dependency>        <dependency>            <groupId>tk.mybatis</groupId>            <artifactId>mapper-spring-boot-starter</artifactId>            <version>1.1.1</version>        </dependency>        <!--poi报表-->        <dependency>            <groupId>org.apache.poi</groupId>            <artifactId>poi</artifactId>            <version>3.15</version>        </dependency>        <dependency>            <groupId>org.apache.poi</groupId>            <artifactId>poi-scratchpad</artifactId>            <version>3.15</version>        </dependency>        <dependency>            <groupId>commons-beanutils</groupId>            <artifactId>commons-beanutils</artifactId>            <version>1.9.3</version>        </dependency>        <dependency>            <groupId>org.apache.poi</groupId>            <artifactId>poi-ooxml</artifactId>            <version>3.14</version>        </dependency>        <!--poi报表--><!--dubbo-->        <dependency>            <groupId>com.alibaba</groupId>            <artifactId>dubbo</artifactId>            <version>2.5.7</version>        </dependency>        <dependency>            <groupId>com.101tec</groupId>            <artifactId>zkclient</artifactId>            <version>0.10</version>        </dependency>        <dependency>            <groupId>com.github.sgroschupf</groupId>            <artifactId>zkclient</artifactId>            <version>0.1</version>        </dependency>    </dependencies>    <dependencyManagement>        <dependencies>            <dependency>                <groupId>com.*****</groupId>                <artifactId>xxxx-common</artifactId>                <version>1.0-SNAPSHOT</version>            </dependency>        </dependencies>    </dependencyManagement>    <repositories>        <repository>            <id>aliyun</id>            <name>aliyun</name>            <url>http://maven.aliyun.com/nexus/content/groups/public</url>            <releases>                <enabled>true</enabled>            </releases>            <snapshots>                <enabled>false</enabled>            </snapshots>        </repository>    </repositories></project>


















评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值