工程需要用JNDI数据源方式部署到tomcat,参考网上文章后,经过配置测试,摸索出来了。
 
 
环境说明:
数据库:Oracle9i
Web服务器:tomcat-6.0.33
tomcat启动方式:server.xml配置context上下文启动
持久层框架:JPA
部署工程名:ipeer-interface(JPA,Spring,CXF)
 
Tomcat部署工程,使用JNDI数据源配置
修改两个地方:server.xml,spring*-dao.xml
 
 
1.修改server.xml,在context节点下增加Resouce节点配置
路径:%CATALINA_HOME%\conf\
 
代码:
<Context path="/ipeer-interface" docBase="G:\workspace\ipeer-interface\WebRoot" reloadable="false">

<Resource name="ipeerDs" auth="Container" type="javax.sql.DataSource"
               maxActive="100" maxIdle="30" maxWait="10000"
               username="ipeer_new" password="passw0rd!" driverClassName="oracle.jdbc.driver.OracleDriver"
               url="jdbc:oracle:thin:@1.1.1.1:1555:dbname"/>

</Context>

 
 
2.修改spring*-dao.xml,数据源bean配置jndi名字
 
代码:
       <bean name="localhost_oracleDS,springSecurityDataSource" class="org.springframework.jndi.JndiObjectFactoryBean" scope="singleton" >
             <!-- jboss format -->
<!--        <property name="jndiName" value="java:/ipeerDs"/>-->
             <!-- tomcat format -->
             <property name="jndiName" value="java:comp/env/ipeerDs"/>
       </bean>
这里的jndiName属性配置要重点讲一下,现在JNDI的Resource名字是ipeerDs。
tomcat需要JNDI前缀,java:comp/env,这里配置的话就是:java:comp/env/ipeerDs。
jboss强悍些,两种配置都能行:java:/ipeerDs或java:comp/env/ipeerDs。webLogic与jboss一样。
参考笔记:Web服务器配置注意要点
 
PS:
1.网上很多文章说需要在web.xml文件中配置一下代码,但是我加与不加,在tomcat6下没有任何影响,一样能成功启动。
       <!-- JNDI数据源,tomcat6可以不需要 -->
       <resource-ref>
             <res-ref-name> ipeerDs</res-ref-name >
             <res-type> javax.sql.DataSource</res-type >
             <res-auth> Container</res-auth >
       </resource-ref>
2.由于这里使用了JPA,所以多了一个persistence.xml文件。工程使用了JTA,jboss的话需要在这个文件中加一个JNDI名字声明配置,而tomcat6加与不加都不会影响到启动。
       <persistence-unit name="localhost_oracle" transaction-type= "JTA">
             <description> generated-persistence-unit</description >
             <provider> org.hibernate.ejb.HibernatePersistence</provider >
 
             <!-- jboss need -->
             <jta-data-source> java:/ipeerDs</jta-data-source > 
 
             <class> com.iproject.core.domain.Authorities</class >
             <class> com.iproject.core.domain.Users</class >
 
             <exclude-unlisted-classes> true</exclude-unlisted-classes >
 
       </persistence-unit>
3.不管是oracle还是mysql等其他数据库,web服务器部署时是需要它们的驱动jar包的。网上很多说启动一定要在%CATALINA_HOME%\lib下添加驱动jar包。我测试后发现:tomcat部署情况下,只要在工程lib目录或tomcat lib目录任一地方添加了驱动jar包,启动就没问题。不一定tomcat lib目录下一定要有数据库驱动jar包。
 
 
 
JNDI配置相关文件:
persistence.xml

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

<persistence-unit name="localhost_oracle" transaction-type="JTA">
<description>generated-persistence-unit</description>
<provider>org.hibernate.ejb.HibernatePersistence</provider>

<!-- jboss need -->
<!-- <jta-data-source>java:/ipeerDs</jta-data-source> -->

<class>com.iproject.core.domain.Authorities</class>
<class>com.iproject.core.domain.Users</class>
<class>com.iproject.core.domain.TSysFunction</class>
<class>com.iproject.core.domain.TSysLog</class>
<class>com.iproject.core.domain.TSysSeriano</class>
<class>com.iproject.core.domain.TBicAgtPrmInfo</class>
<class>com.iproject.core.domain.TBicFinChargebill</class>
<class>com.iproject.core.domain.TSysDept</class>
<class>com.iproject.core.domain.Domain</class>
<class>com.iproject.core.domain.DomainValue</class>
<class>com.iproject.core.domain.TBicPrdTyp</class>
<class>com.iproject.core.domain.TBicCancelInfo</class>
<class>com.iproject.core.domain.SynchronizationTask</class>
<class>com.iproject.core.domain.ProcessDefinition</class>
<class>com.iproject.core.domain.ProcessInstance</class>
<class>com.iproject.core.domain.TBicPrmPlyRel</class>
<class>com.iproject.core.domain.TBicPrmPlyRelId</class>
<class>com.iproject.core.domain.TBicResConfig</class>
<class>com.iproject.core.domain.TBicLog</class>
<class>com.iproject.core.domain.TBicEmp</class>
<class>com.iproject.core.domain.TBasTrdCode</class>
<class>com.iproject.core.domain.PlyuploadLob</class>
<class>com.iproject.core.domain.TBicPlyMain</class>
<class>com.iproject.core.domain.TBicPrdTypCvrgRel</class>
<class>com.iproject.core.domain.TBicPrdTypRel</class>
<class>com.iproject.core.domain.TBicPrmCompute</class>
<class>com.iproject.core.domain.TBicPrmComputeSet</class>
<class>com.iproject.core.domain.TBicEmpCombo</class>
<class>com.iproject.core.domain.TBicVariflightComm</class>
<class>com.iproject.core.domain.TSrcProdSpecRel</class>
<class>com.iproject.core.domain.TBicRateSetSpl</class>
<class>com.iproject.core.domain.TBicElecAir</class>
<class>com.iproject.core.domain.TBicPacketLog</class>

<exclude-unlisted-classes>true</exclude-unlisted-classes>

</persistence-unit>
</persistence>

server.xml

<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="8005" shutdown="SHUTDOWN">

<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
<Listener className="org.apache.catalina.core.JasperListener" />
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>

<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">

<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->

<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->

<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">

<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->

<!-- The request dumper valve dumps useful debugging information about
the request and response data received and sent by Tomcat.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->

<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>

<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->

<!-- Access log processes all example.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
-->

<!--
<Context path="/peerv6_test" docBase="G:\workspace\peerv6_test\WebRoot" reloadable="false"/>
-->

<Context path="/ipeer-interface" docBase="G:\workspace\ipeer-interface\WebRoot" reloadable="false">

<Resource name="ipeerDs" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="ipeer_new" password="passw0rd!" driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@1.1.1.1:1555:dbname"/>

</Context>

<!--
<Context path="/ipeer-task" docBase="G:\workspace\ipeer-task\WebRoot" reloadable="false"/>
-->

<!--
<Context path="/ipeer" docBase="G:\workspace\ipeer\WebRoot" reloadable="false"/>
-->

</Host>

</Engine>
</Service>
</Server>

spring-dao-context.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-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/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">

<!-- ******************************************************************** -->
<!-- Scan for service layer annotated beans -->
<!-- ******************************************************************** -->
<context:component-scan base-package="com.iproject.core.dao" scoped-proxy="interfaces" />

<!-- ******************************************************************** -->
<!-- PropertyConfigurer for the DAO -->
<!-- ******************************************************************** -->
<context:property-placeholder location="classpath:standard-dao.properties" />

<!-- ******************************************************************** -->
<!-- Setup the transaction manager -->
<!-- ******************************************************************** -->
<!-- Using Atomikos Transaction Manager -->
<bean id="atomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager" init-method="init" destroy-method="close">
<property name="forceShutdown" value="true" />
<property name="startupTransactionService" value="true" />
<property name="transactionTimeout" value="60" />
</bean>

<bean id="atomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp" />

<!-- Configure the Spring framework to use JTA transactions from Atomikos -->
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManager" ref="atomikosTransactionManager" />
<property name="userTransaction" ref="atomikosUserTransaction" />
<!-- <property name="transactionSynchronizationName" value="SYNCHRONIZATION_ON_ACTUAL_TRANSACTION" /> -->
</bean>

<!-- 启动注解功能 -->
<tx:annotation-driven transaction-manager="transactionManager" />

<!-- ******************************************************************** -->
<!-- Setup a data source -->
<!-- ******************************************************************** -->
<bean name="localhost_oracleDS,springSecurityDataSource" class="org.springframework.jndi.JndiObjectFactoryBean" scope="singleton">
<!-- jboss format -->
<!-- <property name="jndiName" value="java:/ipeerDs"/>-->
<!-- tomcat format -->
<property name="jndiName" value="java:comp/env/ipeerDs"/>
</bean>

<!-- Using Apache DBCP Data Sources -->
<!-- <bean class="org.apache.commons.dbcp.BasicDataSource"-->
<!-- destroy-method="close" name="localhost_oracleDS,springSecurityDataSource">-->
<!-- <property name="driverClassName" value="${localhost_oracle.connection.driver_class}" />-->
<!-- <property name="username" value="${localhost_oracle.connection.username}" />-->
<!-- <property name="password" value="${localhost_oracle.connection.password}" />-->
<!-- <property name="url" value="${localhost_oracle.connection.url}" />-->
<!-- <property name="maxIdle" value="${localhost_oracle.minPoolSize}" />-->
<!-- <property name="maxActive" value="${localhost_oracle.maxPoolSize}" />-->
<!-- </bean>-->

<!-- ******************************************************************** -->
<!-- Setup each persistence unit -->
<!-- ******************************************************************** -->
<!-- Configure a JPA vendor adapter -->
<bean id="localhost_oracleJPAVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="${localhost_oracle.show_sql}" />
<property name="generateDdl" value="${localhost_oracle.generateDdl}" />
<property name="databasePlatform" value="${localhost_oracle.dialect}" />
</bean>
<!-- EntityManager Factory that brings together the persistence unit, datasource,
and JPA Vendor -->
<bean
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
id="localhost_oracle">
<property name="dataSource" ref="localhost_oracleDS" />
<property name="persistenceUnitName" value="localhost_oracle" />
<property name="jpaVendorAdapter" ref="localhost_oracleJPAVendorAdapter" />
<property name="jpaPropertyMap">
<map>
<entry key="hibernate.transaction.manager_lookup_class"
value="com.atomikos.icatch.jta.hibernate3.TransactionManagerLookup" />
<entry key="hibernate.connection.release_mode" value="on_close" />
</map>
</property>
</bean>

<bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate">
<property name="entityManagerFactory" ref="localhost_oracle" />
</bean>

<bean id="commonDAO" class="com.iproject.core.dao.CommonDAO">
<property name="entityManagerFactory" ref="localhost_oracle" />
</bean>

</beans>

web.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

<display-name>ipeer-interface</display-name>
<description>永诚银保通接口平台</description>

<!-- JNDI数据源,tomcat6可以不需要 -->
<!-- <resource-ref>-->
<!-- <res-ref-name>ipeerDs</res-ref-name>-->
<!-- <res-type>javax.sql.DataSource</res-type>-->
<!-- <res-auth>Container</res-auth>-->
<!-- </resource-ref>-->

<context-param>
<description></description>
<param-name>EAPConfig</param-name>
<param-value>/WEB-INF/EAPConfig.xml</param-value>
</context-param>

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<!-- Spring刷新Interceptor防止内存泄漏 -->
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>

<!-- 启动Socket服务 -->
<listener>
<listener-class>com.iproject.core.restful.SocketServiceInit</listener-class>
</listener>

<filter>
<description>generated-persistence-filter</description>
<filter-name>localhost_oracleFilter</filter-name>
<filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
<init-param>
<param-name>entityManagerFactoryBeanName</param-name>
<param-value>localhost_oracle</param-value>
</init-param>
</filter>

<!-- Character Encoding 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>localhost_oracleFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<servlet>
<servlet-name>InitParameterServlet</servlet-name>
<servlet-class>com.iproject.core.fwk.web.servlet.InitParameterServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>

<servlet>
<servlet-name>EAPConfigServlet</servlet-name>
<servlet-class>com.iproject.core.fwk.web.servlet.EAPConfigServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>

<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<!-- webservice -->
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/ws/*</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>/pages/login.jsp</welcome-file>
</welcome-file-list>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/pages/error.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/pages/error.jsp</location>
</error-page>

</web-app>

Tomcat 6 部署工程总结,使用JNDI数据源配置的更多相关文章

  1. Linux - tomcat -jndi数据源配置

    Linux - tomcat -jndi数据源配置 tomcat/conf/context .xml 文件中修改如下 <Resource name="/jdbc/--" au ...

  2. JNDI数据源配置

    一.数据源的由来 在Java开发中,使用JDBC操作数据库的四个步骤如下:   ①加载数据库驱动程序(Class.forName("数据库驱动类");) ②连接数据库(Connec ...

  3. mysql连接超时与jndi数据源配置

    昨天有运营说添加活动不能用了,我就看了一下后台日志,发现访问数据库是报错: at java.lang.Thread.run(Thread.java:722) Caused by: com.mysql. ...

  4. Hibernate Tomcat JNDI数据源配置(转)

    简述: 配置JNDI 查找Tomcat 中server.xml中定义的数据源 步骤: 1. 修改elipse的数据源server.xml 主要修改如下, 1. 添加下面这段Context文本 其中St ...

  5. 在tomcat下部署工程

    xx系统第一期工程完成,今天老大要我去部署系统,从来就没有在tomcat下部署过,一直都是在myeclipse下部署.启动.运行即可,所以这次遇到了几个问题,记录下来. tomcat启动 在安装tom ...

  6. Spring jndi数据源配置方法

    xml配置: <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverMana ...

  7. tomcat下context.xml中JNDI数据源配置

    jndi(Java Naming and Directory Interface,Java命名和目录接口)是一组在Java应用中访问命名和目录服务的API.命名服务将名称和对象联系起来,使得我们可以用 ...

  8. tomcat之JNDI数据源配置

    一.docbase包含方式部署项目 D:\apache-tomcat-6.0.29\conf\server.xml里面添加如下内容   <Host name="localhost&qu ...

  9. JNDI数据源配置注意事项

    假设是在原有project上改动 1,applicationContext.xml中改动当中的value值 <bean id="dataSource" class=" ...

随机推荐

  1. Packagist 镜像使用方法--composer

    镜像用法 有两种方式启用本镜像服务: 系统全局配置: 即将配置信息添加到 Composer 的全局配置文件 config.json 中.见“方法一” 单个项目配置: 将配置信息添加到某个项目的 com ...

  2. 【Spark】SparkStreaming-高可用-HA-Master

    SparkStreaming-高可用-HA-Master sparkstreaming master 高可用_百度搜索 Spark:Master High Availability(HA)高可用配置的 ...

  3. __attribute__中constructor和destructor[总结]

    1.前言 最近看到一份代码,看到一个函数前面用__attribute__((destructor))修饰,当时感觉有点怪怪的,搜了整个程序,也没发现哪个地方调用这个函数.于是从字面意思猜想,该函数会在 ...

  4. JPA(四):EntityManager

    Persistence Persistence类使用于获取EntityManagerFactory实例,该类包含一个名为createEntityManagerFactory的静态方法. // 创建En ...

  5. You must have a copy of the scp binary locally to use the scp feature

    在运行docker-machine scp 命令的时候,报错: "You must have a copy of the scp binary locally to use the scp ...

  6. (纪录片)数学的故事 The Story of Maths (2008)

    简介: 导演: Robin Dashwood编剧: Marcus du Sautoy主演: Marcus du Sautoy类型: 纪录片官方网站: www.bbc.co.uk/programmes/ ...

  7. clearfix 兼容IE6/IE7,解决ie6/ie7下多出一行的问题,bootstrap的clearfix的bug

    .clearfix:before, .clearfix:after { content: "."; display: block; height: ; overflow: hidd ...

  8. 解剖 CPU(另)

    http://itbbs.pconline.com.cn/notebook/11026377.html 话不多说,这个处理器,就是今天我们要厮杀的对象! 1. 案板上的她,静静等等手术的进行! 2. ...

  9. jQuery最简单的表单提交方式

    第一步:绑定事件 常用的与ajax相关的事件参考如下: 1.$(selector).click(function) 2.$(selector).change(function) 3.$(selecto ...

  10. 微信小程序 - 自定义弹窗组件

    2019-01-06:简化了一些代码,以及增加了可用性. // 弹窗配置 dialogConfig: { // 弹窗 dialogvisible: false, options: { // 显示关闭按 ...