文档章节

spring maven cxf jackson restful

漂泊者及其影子
 漂泊者及其影子
发布于 2014/06/17 00:38
字数 1611
阅读 6058
收藏 22
点赞 2
评论 1

1、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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	id="WebApp_ID" version="2.5">
	<display-name>bsl-system-web</display-name>

	<!-- Character Filter -->
	<filter>
		<filter-name>encodingFilter</filter-name>
		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>encodingFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>


	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath*:META-INF/spring/ApplicationContext.xml</param-value>
	</context-param>
		<!-- Spring Listener -->
	 <listener> 
      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 
  </listener> 
	<servlet>
	    <servlet-name>CXFService</servlet-name>
	    <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
	</servlet>
 
	<servlet-mapping>
	    <servlet-name>CXFService</servlet-name>
	    <url-pattern>/api/*</url-pattern>
	</servlet-mapping>
	
   	<error-page>
		<exception-type>java.lang.Throwable</exception-type>
		<location>/WEB-INF/pages/error/500.html</location>
	</error-page>
	<error-page>
		<error-code>500</error-code>
		<location>/WEB-INF/pages/error/500.html</location>
	</error-page>
	<error-page>
		<error-code>404</error-code>
		<location>/WEB-INF/pages/error/404.jsp</location>
	</error-page>
	
	<welcome-file-list>
		<welcome-file>/pages/index.jsp</welcome-file>
	</welcome-file-list>

	<distributable />
</web-app>



2、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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.winssage</groupId>
	<artifactId>bslogic</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>pom</packaging>

	<name>bslogic</name>
	<url>http://maven.apache.org</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java-version>1.6</java-version>
		<servlet-api.version>2.5</servlet-api.version>
		<jsp-api.version>2.2</jsp-api.version>
		<jstl.version>1.2</jstl.version>
		<org.springframework-version>3.2.5.RELEASE</org.springframework-version>
		<org.aspectj-version>1.7.4</org.aspectj-version>
		<org.slf4j-version>1.7.5</org.slf4j-version>
		<jackson.version>2.1.4</jackson.version>
	</properties>
<repositories>
		<repository>
			<id>spring-release</id>
			<name>Spring Maven Release Repository</name>
			<url>http://repo.springsource.org/libs-release</url>
		</repository>
		<repository>
			<id>spring-maven-release</id>
			<url>http://maven.springframework.org/release</url>
		</repository>
		<repository>
			<id>dayatang-releases</id>
			<url>http://www.dayatang.com/nexus/content/groups/public-release/</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>dayatang-snapshots</id>
			<url>http://www.dayatang.com/nexus/content/groups/public-snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>koala-snapshots</id>
			<url>http://nexus.openkoala.org/nexus/index.html</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>koala-release</id>
			<url>http://nexus.openkoala.org/nexus/index.html</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>
	
	<dependencies>

		<!-- Spring -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>${org.springframework-version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<version>${org.springframework-version}</version>
		</dependency>

		<!-- 用于支持事务 -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
			<version>${org.springframework-version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${org.springframework-version}</version>
			<exclusions>
				<!-- Exclude Commons Logging in favor of SLF4j -->
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc-portlet</artifactId>
			<version>${org.springframework-version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
			<version>${org.springframework-version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>${org.springframework-version}</version>
		</dependency>
		<!-- hibernate begin -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<version>3.6.3.Final</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-jpa</artifactId>
			<version>1.1.2.RELEASE</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId> cxf-common-utilities </artifactId>
			<version>2.5.10</version>
		</dependency>

		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-entitymanager</artifactId>
			<version>3.6.3.Final</version>
		</dependency>

		<dependency>
			<groupId>c3p0</groupId>
			<artifactId>c3p0</artifactId>
			<version>0.9.1.2</version>
		</dependency>

		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
			<version>3.1.0.GA</version>
		</dependency>

		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<version>1.4</version>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.22</version>
		</dependency>

		<!-- hibernate end -->

		<!-- AspectJ -->
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjrt</artifactId>
			<version>${org.aspectj-version}</version>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>1.6.12</version>
		</dependency>
		<!-- Logging -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${org.slf4j-version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>${org.slf4j-version}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>${org.slf4j-version}</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.17</version>
			<exclusions>
				<exclusion>
					<groupId>javax.mail</groupId>
					<artifactId>mail</artifactId>
				</exclusion>
				<exclusion>
					<groupId>javax.jms</groupId>
					<artifactId>jms</artifactId>
				</exclusion>
				<exclusion>
					<groupId>com.sun.jdmk</groupId>
					<artifactId>jmxtools</artifactId>
				</exclusion>
				<exclusion>
					<groupId>com.sun.jmx</groupId>
					<artifactId>jmxri</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- @Inject -->
		<dependency>
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
			<version>1</version>
		</dependency>


		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.3</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-dbcp2</artifactId>
			<version>2.0</version>
		</dependency>
		<dependency>
			<groupId>commons-beanutils</groupId>
			<artifactId>commons-beanutils</artifactId>
			<version>1.9.1</version>
		</dependency>
		<!-- Servlet -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>${servlet-api.version}</version>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<version>${jsp-api.version}</version>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
			<version>${jstl.version}</version>
		</dependency>

		<!-- Test -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib-nodep</artifactId>
			<version>2.2</version>
		</dependency>
		

		<dependency>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-rt-frontend-jaxws</artifactId>
				<version>2.7.3</version>
			</dependency>
			<dependency>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-rt-frontend-jaxrs</artifactId>
				<version>2.7.3</version>
			</dependency>
			<dependency>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-rt-rs-extension-providers</artifactId>
				<version>2.7.3</version>
			</dependency>
			<dependency>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-rt-transports-http</artifactId>
				<version>2.7.3</version>
			</dependency>
	       <dependency>
	           <groupId>org.codehaus.jettison</groupId>
	           <artifactId>jettison</artifactId>
				<version>1.3.2</version>
	       </dependency>
	       	<dependency>
				<groupId>javax.ws.rs</groupId>
				<artifactId>jsr311-api</artifactId>
				<version>1.1.1</version>
			</dependency>


	<!-- JSON begin -->
	<dependency>
		<groupId>com.fasterxml.jackson.core</groupId>
		<artifactId>jackson-core</artifactId>
		<version>${jackson.version}</version>
	</dependency>
	<dependency>
		<groupId>com.fasterxml.jackson.core</groupId>
		<artifactId>jackson-databind</artifactId>
		<version>${jackson.version}</version>
	</dependency>

	<dependency>
		<groupId>com.fasterxml.jackson.core</groupId>
		<artifactId>jackson-annotations</artifactId>
		<version>${jackson.version}</version>
	</dependency>
	<dependency>
		<groupId>com.fasterxml.jackson.module</groupId>
		<artifactId>jackson-module-jaxb-annotations</artifactId>
		<version>${jackson.version}</version>
	</dependency>
	<dependency>
		<groupId>com.fasterxml.jackson.jaxrs</groupId>
		<artifactId>jackson-jaxrs-json-provider</artifactId>
		<version>${jackson.version}</version>
		<!-- Jackson2.2.0 版本对于 CXF2.7.3 不支持 -->
		<!-- http://www.marshut.com/krrqx/fasterxml-jackson-2-2-provider-no-longer-works-with-cxf-jax-rs.pdf -->
		<!-- http://cxf.547215.n5.nabble.com/Creating-input-values-on-WADL-td5728910.html -->
	</dependency>

	<!-- Spring WebMVC 3.1.2 用到 -->
	<dependency>
		<groupId>org.codehaus.jackson</groupId>
		<artifactId>jackson-mapper-asl</artifactId>
		<version>1.9.0</version>
	</dependency>
	<dependency>
		<groupId>org.codehaus.jackson</groupId>
		<artifactId>jackson-core-asl</artifactId>
		<version>1.9.0</version>
	</dependency>

	<!-- JSON end -->

			
	</dependencies>


	<build>
		<plugins>
			<!-- 配置加入jetty服务器,开发时我们一般使用jetty服务器 -->
			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>jetty-maven-plugin</artifactId>
				<configuration>
					<!-- 设置扫描target/classes内部文件变化时间间隔 -->
					<scanIntervalSeconds>2</scanIntervalSeconds>
					<webApp>
						<contextPath>/gotian-web</contextPath>
					</webApp>
				</configuration>
			</plugin>
			<!-- compiler插件, 设定JDK版本 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.0</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
					<showWarnings>true</showWarnings>
				</configuration>
			</plugin>

			<!-- war打包插件, 设定war包名称不带版本号 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<warName>gotian</warName>
				</configuration>
			</plugin>
			<!-- eclipse插件, 设定wtp版本 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-eclipse-plugin</artifactId>
				<version>2.9</version>
				<configuration>
					<downloadSources>true</downloadSources>
					<downloadJavadocs>false</downloadJavadocs>
					<wtpversion>2.0</wtpversion>


				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>install</id>
						<phase>install</phase>
						<goals>
							<goal>sources</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- 用于支持跨模块加载配置文件 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<encoding>UTF-8</encoding>
					<nonFilteredFileExtensions>
						<nonFilteredFileExtension>dll</nonFilteredFileExtension>
						<nonFilteredFileExtension>so</nonFilteredFileExtension>
					</nonFilteredFileExtensions>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<modules>
		<module>bslogic-application</module>
		<module>bslogic-applicationImpl</module>
		<module>bslogic-conf</module>
		<module>bslogic-ws-deploy</module>
		<module>bslogic-core</module>
	</modules>
</project>



3、ws-cxf.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:util="http://www.springframework.org/schema/util"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxrs="http://cxf.apache.org/jaxrs"
	xmlns:cxf="http://cxf.apache.org/core"
	xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
		http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
		http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
		http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
		http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd">
	<import resource="classpath*:META-INF/cxf/cxf.xml" />
	<import resource="classpath*:META-INF/cxf/cxf-servlet.xml" />
		<!--<import resource="classpath*:META-INF/cxf/cxf-extension-soap.xml" />-->

	<http-conf:destination name="*.http-destination">
		<http-conf:server ReceiveTimeout="10000" />
	</http-conf:destination>

	<bean id="jacksonObjectMapper"
		class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"></bean>

	<bean id="jacksonProvider"
		class="com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider">
		<property name="mapper" ref="jacksonObjectMapper" />
	</bean>
	
	<jaxrs:server id="mamApplication" address="/">
		<jaxrs:features>
			<cxf:logging />
		</jaxrs:features>
		<jaxrs:serviceBeans>
			<!-- 用户管理-->
			<ref bean="userApplication" />
		</jaxrs:serviceBeans>
		<jaxrs:extensionMappings>
			<entry key="feed" value="application/atom+xml" />
			<entry key="json" value="application/json" />
			<entry key="xml" value="application/xml" />
			<entry key="html" value="text/html" />
		</jaxrs:extensionMappings>
		<jaxrs:providers>
       		<ref bean="jacksonProvider"/>
				<!-- <bean class="com.foreveross.common.infra.exception.handle.CxfExceptionMapper">
				<property name="systemName" value="mam"/>
			</bean>-->
		</jaxrs:providers>
	</jaxrs:server>

</beans>



4、UserApplication.java

package com.winssage.bslogic.application;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.winssage.bslogic.application.vo.UserVO;

@Path(value = "/user")
public interface UserApplication {

	@GET
	@Path("/sayHello/{name}")
	@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
	public List<UserVO> sayHello(@PathParam("name") String name);
}



5 、UserApplicationImpl.java

package com.winssage.bslogic.applicationImpl;

import java.util.ArrayList;
import java.util.List;

import javax.inject.Named;

import org.springframework.transaction.annotation.Transactional;

import com.winssage.bslogic.application.UserApplication;
import com.winssage.bslogic.application.vo.UserVO;

@Named("userApplication")
@Transactional
public class UserApplicationImpl implements UserApplication {

	@Override
	public List<UserVO> sayHello(String name) {
		List<UserVO> userList = new ArrayList<UserVO>();
		UserVO userVO = new UserVO();
		userVO.setName("fengshu");
		userVO.setAge(23);
		userList.add(userVO);
		return userList;
	}

}



6、查看所有发布的接口

http://localhost:9080/bslogic-ws-deploy/api/bslogic-ws-deploy?_wadl

7、调用已发布get接口

http://localhost:9080/bslogic-ws-deploy/api/user/sayHello/fengshu

© 著作权归作者所有

共有 人打赏支持
漂泊者及其影子
粉丝 42
博文 118
码字总数 72105
作品 0
广州
程序员
加载中

评论(1)

李丽丹
Spring Controller全面支持Restful风格呀,也提供JSON转换的HttpMessageConverter,是否还需要引入这个CXF,值得探讨一下。
看相片,当年挺苗条呀
NutzBoot v2.1.7 新增 maven 插件和 mqtt-client

NutzBoot v2.1.7 已发布,更新如下: 新增maven插件和mqtt支持 时间: 2018-05-04 事件: 青年节 曲目: Penguin's Game 兼容性: 与2.0.x和2.1.x完全兼容 变更: fix: 修改jetty热加载无效问题 ...

wendal ⋅ 05/04 ⋅ 0

SOA调用wsdl报 No binding operation info while invoking unknown method with params unknown

根据xsd文件用cxf生成对应wsdl,提供给soa调用,soa调用报No binding operation info while invoking unknown method with params unknown 接口模式是订阅发布; 1.想询问如何定位问题;2.想...

cflulu-heixiong ⋅ 06/06 ⋅ 0

JAX-RS 方式的 RESTful Web Service 开发

Web Service 目前在风格上有两大类,一个是基于 SOAP 协议,一个是完全遵循 HTTP 协议规范的RESTful 风格。 SOAP 方式的 web service 已经很成熟了,应用也很广,已经成为 Web Service 的工业...

小致dad ⋅ 2016/07/13 ⋅ 0

mule发布调用webservice

mule发布webservice 使用mule esb消息总线发布和调用webservice都非常精简,mule包装了所有操作,你只需要拖控件配置就可以,下面讲解mule发布: 1.下面是flow,http监听接口,CXF发布webse...

jiazhipeng12 ⋅ 05/28 ⋅ 0

Apache CXF 和 Spring 开发RESTful Web Service 2

开发环境 MavenEclipseTomcat 快速构建 archetype太少?关于如何添加本地archetype catalog: 下载文件 http://repo1.maven.org/maven2/archetype-catalog.xml 设置Eclipse 首选项 Maven Arch......

Cong_Cong ⋅ 2015/12/10 ⋅ 0

Android调用Axis、Axis2、Cxf发布的web service

在Android中调用axis2发布web service过程中一直报http500错误,axis2 web service是用eclipse插件生成的,发现直接打包成war包或直接在eclipse运行,Android调用的时候会报错,一定要打包成...

yuewawa ⋅ 05/04 ⋅ 0

spring mvc 整合 jpa 搭建基于领域驱动模型框架搭建

一、maven 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 h......

漂泊者及其影子 ⋅ 2014/06/16 ⋅ 0

使用cxf发布webservice总结

一、概念 1、什么是webservice Web service是一个平台独立的,低耦合的,自包含的、基于可编程的web的应用程序,可使用开放的XML标准来描述、发布、发现、协调和配置这些应用程序,用于开发分...

漂泊者及其影子 ⋅ 2014/08/21 ⋅ 0

因为Java10发布所以学些Java8

前言 不知不觉间Java10TM都发布了,看了下新特性,好激动啊,然后回过头来继续工作,叹一口气,看着这个已经上线在改造过程中的Java7项目开始暗自神伤 总想找点代码来写,可是这些年太依赖客...

天下无敌强 ⋅ 03/31 ⋅ 0

Apache CXF 介绍

Apache CXF 简介 关于Apache CXF   Apache CXF = Celtix + XFire,Apache CXF 的前身叫 Apache CeltiXfire,现在已经正式更名为 Apache CXF 了,以下简称为 CXF。CXF 继承了 Celtix 和 XF...

hanfeng ⋅ 2014/07/04 ⋅ 1

没有更多内容

加载失败,请刷新页面

加载更多

下一页

JPA入门,配置文件的设置

<?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http......

码农屌丝 ⋅ 16分钟前 ⋅ 0

Java基础——面向对象和构造器

声明:本栏目所使用的素材都是凯哥学堂VIP学员所写,学员有权匿名,对文章有最终解释权;凯哥学堂旨在促进VIP学员互相学习的基础上公开笔记。 静态成员介绍 为什么要有静态成员?静态成员用来...

凯哥学堂 ⋅ 18分钟前 ⋅ 0

vmware中Centos 7 linux的LVM磁盘扩容

系统是RHEL7(centos7差不多一样) 关闭系统,在vmware、设置、硬盘、扩展、输入数字大于当前系统内存、点击扩展。 开机再查看磁盘信息 fdisk -l 注意:可以看出sda磁盘增加了,但是根目录还...

gugudu ⋅ 28分钟前 ⋅ 0

JAVA线程sleep和wait方法区别

昨天面试,突然被问到sleep 和 wait的区别,一下子有点蒙,在这里记一下,以示警戒。 首先说sleep,sleep就是正在执行的线程主动让出cpu,cpu去执行其他线程,在sleep指定的时间过去后,cpu...

徐玉强 ⋅ 30分钟前 ⋅ 0

vuex学习--模块

随着项目复杂性增加,共享状态也越来越多。需要对转态操作进行分组,分组后在进行分组编写。学习一下module:状态管理器的模块组操作。 首先是声明: const moduleA={ state,mutations,g...

大美琴 ⋅ 33分钟前 ⋅ 0

Selenium 简单入门

安装 pip install selenium 驱动下载 https://chromedriver.storage.googleapis.com/index.html 下载最新的驱动,放入path中,可以放入Python的scripts目录下,也可以放入Chrome安装目录,并...

阿豪boy ⋅ 34分钟前 ⋅ 0

292. Nim Game - LeetCode

Question 292. Nim Game Solution 思路:试着列举一下,就能发现一个n只要不是4的倍数,就能赢。 n 是否能赢1 true2 true3 true4 false 不论删除几,对方都能一把赢5 t...

yysue ⋅ 今天 ⋅ 0

6.5 zip压缩工具 6.6 tar打包 6.7 打包并压缩

zip压缩工具 zip命令可以压缩目录和文件,-r 压缩目录。 zip使用方法 zip 1.txt.zip 1.txt //压缩文件 zip -r 123.zip 123/ //压缩目录 unzip 1.txt.zip //解压 unzip 123.zip -d /root/456...

Linux_老吴 ⋅ 今天 ⋅ 0

react-loadable使用跳坑

官方给react-loadable的定义是: A higher order component for loading components with dynamic imports. 动态路由示例 withLoadable.js import React from 'react'import Loadable fro......

pengqinmm ⋅ 今天 ⋅ 0

记录工作中遇到的坑

1、ios safari浏览器向下滚动会触发window resize事件

端木遗风 ⋅ 今天 ⋅ 0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部