pom

<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.</modelVersion>
<groupId>com.icil</groupId>
<artifactId>springwebservice_rest_ser</artifactId>
<version>0.0.-SNAPSHOT</version>
<packaging>war</packaging> <!--配置版本号 -->
<properties>
<jackson.version>1.9.</jackson.version>
<cxf.version>3.1.</cxf.version>
<mysql.version>5.1.</mysql.version>
<spring.version>4.3..RELEASE</spring.version>
<hibernate.version>5.1..Final</hibernate.version>
<querydsl.version>4.1.</querydsl.version>
</properties> <dependencies>
<!-- Spring Framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</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-context-support</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-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</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-test</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency> <!-- Spring Framework end --> <!-- c3p0 start -->
<!-- https://mvnrepository.com/artifact/com.mchange/c3p0 -->
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.5.2</version>
</dependency>
<!-- c3p0 end --> <!-- ehcache start -->
<!-- <dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache-core</artifactId>
<version>2.6.</version> </dependency> -->
<!-- ehcache end --> <!--JPA start -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.10..RELEASE</version>
</dependency>
<!--JPA end --> <!--hibernate start -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency> <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-ehcache -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>${hibernate.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-c3p0 -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>${hibernate.version}</version>
</dependency> <!--hibernate end --> <!--mysql start -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
</dependency>
<!--mysql end --> <!--logger start -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.1.</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.</version>
</dependency>
<!--logger end --> <!--test start -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!--test end --> <!--common start -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.</version>
</dependency>
<!--common end --> <!-- https://mvnrepository.com/artifact/javax.servlet/jstl -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency> <!-- CXF -->
<!--cxf-rt-frontend-jaxws支持soap类型服务 -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<!--cxf-rt-frontend-jaxrs支持rest服务 -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
</dependency>
<!--用于跨域的jar包 -->
<dependency>
<groupId>com.thetransactioncompany</groupId>
<artifactId>java-property-utils</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>com.thetransactioncompany</groupId>
<artifactId>cors-filter</artifactId>
<version>1.7</version>
</dependency> <!-- Jackson Json处理工具包 用于处理bean 到 json json dao bean -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.4.</version>
</dependency> <!--json-->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- 用于序列化json服务 -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-xc</artifactId>
<version>${jackson.version}</version>
</dependency> </dependencies> <build>
<finalName>testjpa</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
</plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- 引入tomcat插件 -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>/</path>
<port></port>
</configuration>
</plugin> </plugins>
</build> </project>

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" version="2.5">
<display-name>webservice</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list> <!-- 配置过滤器 将POST请求转换为PUT和DELETE请求 -->
<filter>
<filter-name>HiddenHttpMethodFilter</filter-name>
<filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>HiddenHttpMethodFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> <context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:application*.xml</param-value>
</context-param> <listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>cxf</servlet-name>
<servlet-class> org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>cxf</servlet-name>
<url-pattern>/webservice/*</url-pattern>
</servlet-mapping>
</web-app>

applicationcontent.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:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:soap="http://cxf.apache.org/bindings/soap"
xsi:schemaLocation="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://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://cxf.apache.org/bindings/soap
http://cxf.apache.org/schemas/configuration/soap.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd
">
<!-- 引入CXF Bean定义如下,早期的版本中使用 -->
<!-- <import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> --> <!-- 配置自动扫描的包 -->
<context:component-scan base-package="com.icil"></context:component-scan> <!-- 配置 C3P0 数据源 -->
<context:property-placeholder location="classpath:db.properties"/> <bean id="dataSource"
class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="user" value="${jdbc.user}"></property>
<property name="password" value="${jdbc.password}"></property>
<property name="driverClass" value="${jdbc.driverClass}"></property>
<property name="jdbcUrl" value="${jdbc.jdbcUrl}"></property> <!-- 配置其他属性 -->
</bean> <!-- 配置 EntityManagerFactory -->
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<!-- 配置 JPA 提供商的适配器. 可以通过内部 bean 的方式来配置 -->
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"></bean>
</property>
<!-- 配置实体类所在的包 -->
<property name="packagesToScan" value="com.icil.entity"></property>
<!-- 配置 JPA 的基本属性. 例如 JPA 实现产品的属性 -->
<property name="jpaProperties">
<props>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
</bean> <!-- 配置 JPA 使用的事务管理器 -->
<bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"></property>
</bean> <!-- 配置支持基于注解是事务配置 -->
<tx:annotation-driven transaction-manager="transactionManager"/> <!-- CXF 注册服务 -->
<!-- <bean id="customerService" class="com.icil.service.CustomerServiceImpl"></bean> -->
<!-- <jaxws:server id="myService" address="/customer">
<jaxws:serviceBean>
<ref bean="customerService"/>
</jaxws:serviceBean>
</jaxws:server> --> </beans>

applicationWebService.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:jaxws="http://cxf.apache.org/jaxws"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.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"> <!--
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>--> <bean id="customerService" class="com.icil.service.CustomerServiceImpl"></bean>
<jaxrs:server id="webService" address="/">
<!--输入拦截器设置-->
<jaxrs:inInterceptors>
<bean class="com.icil.interceptor.BeforeInterceptor1"></bean>
<bean class="com.icil.interceptor.BeforeInterceptor"></bean>
</jaxrs:inInterceptors> <!--输出拦截器设置-->
<jaxrs:outInterceptors>
<bean class="org.apache.cxf.interceptor.LoggingInInterceptor"> </bean>
<bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"></bean>
</jaxrs:outInterceptors> <!--serviceBeans:暴露的WebService服务类-->
<jaxrs:serviceBeans>
<ref bean="customerService"/>
</jaxrs:serviceBeans> <!--支持的协议-->
<jaxrs:extensionMappings>
<entry key="json" value="application/json"/>
<entry key="xml" value="application/xml"/>
</jaxrs:extensionMappings>
<!--编码格式-->
<jaxrs:languageMappings> </jaxrs:languageMappings> <!--对象转换, 此处可以定义多个-->
<jaxrs:providers>
<!-- 注册数据转换器,该转换器会自动将JavaBean转换为json数据 -->
<bean class="org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider"/>
<!-- JAX-RS 自动将传送的数据解析成 JAXBElement 包装类 -->
<bean class="org.apache.cxf.jaxrs.provider.JAXBElementProvider" />
</jaxrs:providers>
</jaxrs:server>
</beans>

db.properties

jdbc.user=root
jdbc.password=dAhlofwww
jdbc.driverClass=com.mysql.jdbc.Driver
jdbc.jdbcUrl=jdbc:mysql:///sea

inteface:

package com.icil.service;

import java.util.List;

import javax.jws.WebService;
import javax.ws.rs.BeanParam;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs.MatrixParam;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam; import com.icil.entity.Customer;
@WebService
@Path("/customerService")
//@Produces({MediaType.APPLICATION_JSON,"application/json;charset=utf-8"}) //返回JSON
public interface CustomerService { @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_XML})//@Produces 输出数据的格式
@GET //http中的get方法
@Path("/find/{id}") // @PathParam("id")//可以获取URI中指定规则的参数
Customer findCustomerById( @PathParam("id")int cid); @Produces({MediaType.APPLICATION_JSON,"application/json;charset=utf-8"}) //返回JSON
@GET
@Path("/findCustomers")
List<Customer> findCustomerAll(); @GET //查找
@Path("/findAll")
String findAllCustomer(); //该方法实现已将对象转为json /* @PUT //putch修改 update
@Consumes(MediaType.APPLICATION_JSON)//接受数据的格式
@Path("/updateCustomerName/{cid}/{cname}")
void updateCustomerName(@PathParam("cid")int cid,@PathParam("cname") String cname);
*/ /*******************put 参数 形式 *******************/
//http://locahost/customerService/updateCustomerName ? cid=2&cname="AAAAA"
@PUT //putch修改 updPate
// @Consumes(MediaType.APPLICATION_JSON)//接受数据的格式
@Path("/updateCustomerName/{cid}/{cname}")
// @QueryParam 用于获取GET请求中的查询参数
void updateCustomerName1(@PathParam("cid") int cid,@PathParam("cname") String cname); /*******************get 参数 形式1 *******************/
//http://locahost/customerService/updateCustomerName ? cid=2&cname="AAAAA"
@GET//putch修改 updPate
// @Consumes(MediaType.APPLICATION_JSON)//接受数据的格式
@Path("/updateCustomerName")
// @QueryParam 用于获取GET请求中的查询参数
void updateCustomerName(@QueryParam("cid") int cid,@QueryParam("cname") String cname); /*******************get 参数 形式2 *******************/
/**
* @matrixparam注释可以用来绑定包含多个 property (属性)=value(值) 方法参数表达式。
* 例如,你要调用一个网址 
*   http://locahost/customerService/updateCustomerName ? cid=2&cname="AAAAA"
*
*/
/* @PUT
@Consumes(MediaType.APPLICATION_JSON)//接受数据的格式
@Path("/updateCustomerName")
public String updateCustomerName(@MatrixParam("cid") String cid, @MatrixParam("cname") String cname) ; */ /*******************表单提交 post 参数问题1 ********************************/ //@FormParam,从POST请求的表单参数中获取数据
@POST
/* application/x-www-form-urlencoded: 窗体数据被编码为名称/值对。
当action为get时候,浏览器用x-www-form-urlencoded的编码方式把form数据转换成一个字串(name1=value1&name2=value2…),
然后把这个字串append到url后面,用?分割,加载这个新的url。*/
// @Consumes("application/x-www-form-urlencoded")
// @Consumes(value={"text/xml", "application/json"})
@Path("/addForm")
public void addCustomerForm(@FormParam(value="cname") String cname); /*******************表单提交 post 参数问题2 ********************************/ //@BeanParam的使用
// 当请求参数很多时,比如客户端提交一个修改用户的PUT请求,请求中包含很多项用户信息。这时可以用@BeanParam。 @POST
//@Consumes(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_XML)
@Path("/add")
public void add(@RequestBody Customer customer); @POST //增加 不安全 ,每次都不一样,都会创建资源
@Consumes(MediaType.APPLICATION_JSON)
@Path("addCustomer")
void addCustomer(Customer customer); @DELETE // 删除
//@Consumes(MediaType.APPLICATION_JSON)//接受数据的格式
@Path("/deleteCustomerById/{cid}")
void deleteCustomerById(@PathParam("cid")int cid ); }

inteceptor

package com.icil.interceptor;

import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.interceptor.InterceptorChain;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.springframework.stereotype.Component; /**
*自定义拦截器0
*/
@Component
public class BeforeInterceptor extends AbstractPhaseInterceptor<Message>{ public BeforeInterceptor() {
super(Phase.POST_INVOKE); //在方法调用之后调用
// TODO Auto-generated constructor stub
} @Override
public void handleMessage(Message mes) throws Fault {
System.out.println("在方法调用之后调用:已经调用"); } }

sssp-webservce_restful的更多相关文章

  1. vijos 1053Easy sssp

    P1053Easy sssp Accepted 标签:图结构 最短路     描述 输入数据给出一个有N(2 <= N <= 1,000)个节点,M(M <= 100,000)条边的 ...

  2. 【SSSP】A forward-backward single-source paths algorithm

    0. 引子基础的算法和数据结构已经学习的差不多了,上学期期末就打算重点研究研究STOC和FOCS上面的论文.做这件事情的初衷是了解别人是如何改进原有算法的,搞清楚目前比较热的算法问题有哪些,更重要的是 ...

  3. SPFA_YZOI 1662: Easy sssp

    题目描述 输入数据给出一个有N(2  < =  N  < =  1,000)个节点,M(M  < =  100,000)条边的带权有向图.  要求你写一个程序,  判断这个有向图中是 ...

  4. vijosP1053 Easy sssp

    vijosP1053 Easy sssp 链接:https://vijos.org/p/1053 [思路] SPFA. 题目中的陷阱比较多,但是只要中规中矩的写SPFA诸如:s与负圈不相连,有重边的情 ...

  5. vijos1053Easy sssp

    P1053Easy sssp 描述 输入数据给出一个有N(2 <= N <= 1,000)个节点,M(M <= 100,000)条边的带权有向图. 要求你写一个程序, 判断这个有向图 ...

  6. Easy sssp

    Easy sssp 时间限制: 1 Sec  内存限制: 128 MB提交: 103  解决: 20[提交][状态][讨论版] 题目描述 输入数据给出一个有N(2  < =  N  < = ...

  7. sssp maven pom

    pom <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.or ...

  8. Easy sssp(spfa)(负环)

    vijos    1053    Easy sssp 方法:用spfa判断是否存在负环 描述 输入数据给出一个有N(2 <= N <= 1,000)个节点,M(M <= 100,00 ...

  9. Vijos1053 Easy sssp[spfa 负环]

    描述 输入数据给出一个有N(2 <= N <= 1,000)个节点,M(M <= 100,000)条边的带权有向图. 要求你写一个程序, 判断这个有向图中是否存在负权回路. 如果从一 ...

  10. [ACM_图论] Domino Effect (POJ1135 Dijkstra算法 SSSP 单源最短路算法 中等 模板)

    Description Did you know that you can use domino bones for other things besides playing Dominoes? Ta ...

随机推荐

  1. hdu2084 数塔 DP

    数字三角形,DP裸题 #include<stdio.h> #include<string.h> #define max(a,b) (a)>(b)?a:b ][],dp[] ...

  2. python open和file的区别

    opne和file都是用来对文件的操作 open:内置函数,使用方式是open('file_name', mode, buffering),返回值是一个file对象,以写模式打开文件如果不存在会被创建 ...

  3. 龙儿经理嘴上经常说的B树

    国内的数据结构教材一般是按照Knuth定义,即“阶”定义为一个节点的子节点数目的最大值. 对于一棵m阶B-tree,每个结点至多可以拥有m个子结点.各结点的关键字和可以拥有的子结点数都有限制 规定m阶 ...

  4. JNI学习笔记_C调用Java

    一.笔记 1.C调用Java中的方法,参考jni.pdf pg97可以参考博文:http://blog.csdn.net/lhzjj/article/details/26470999步骤: a. 创建 ...

  5. bat根据星期启动程序

    原来公司里的由于每次开机时启动的程序比较多,所以打算使用批处理程序,这里只列举了部分.在每周一到周五的时候,开机则启动指定的应用程序,如果是周末的两天则不启动任何程序,所以做了这个脚本.你如果需要,根 ...

  6. openwrt lamp

    https://applefreak111.wordpress.com/2013/03/12/howtoopenwrt-lamp-stack%E5%AE%89%E8%A3%9D/ opkg updat ...

  7. MySQL中drop,truncate 和delete的区别

    注意:这里说的delete是指不带where子句的delete语句 相同点: truncate和不带where子句的delete, 以及drop都会删除表内的数据 不同点: truncate和 del ...

  8. linux同一客户端多个git账号的配置

    有时候我们需要在同一台机器上使用多个git账号,为了避免冲突,我们需要配置~/.ssh/config文件. 步骤一:用ssh-keygen命令生成一组新的id_rsa_new和id_rsa_new.p ...

  9. linux上通过lighttpd上跑一个C语言的CGI小页面以及所遇到的坑

    Common Gateway Interface如雷贯耳,遗憾的是一直以来都没玩过CGI,今天尝试一把.Tomcat可以是玩CGI的,但得改下配置.为了方便,直接使用一款更轻量级的web服务器ligh ...

  10. Android Studio 默认keystore 以及自定义keystore

    我们使用Android Studio 运行或测试我们的app  它使用一个默认的debug.keystore进行签名. 这个默认签名(keystore)是不需要密码的,它的默认位置在 $HOME/.a ...