Tomcat配置多个域名会影响效率吗?

sheet_ 2016-04-21 02:12:00
Tomcat配置多个域名会影响效率吗?
...全文
1027 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
jun1210 2017-06-16
  • 打赏
  • 举报
回复
<context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath:application-base.xml </param-value> </context-param> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <servlet> <servlet-name>web-app</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/web-app-servlet.xml</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>web-app</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> --------------------------------------------------------- <?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:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:tx="http://www.springframework.org/schema/tx" 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/mvc http://www.springframework.org/schema/mvc/spring-mvc-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/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd "> <mvc:annotation-driven /> <aop:aspectj-autoproxy proxy-target-class="true"/> <context:component-scan base-package="egc.simp.vo ,egc.simp.aop"> <context:include-filter type="annotation" expression="org.aspectj.lang.annotation.Aspect"/> </context:component-scan> <context:component-scan base-package="egc" > <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/> </context:component-scan> <mvc:resources mapping="/fa/**" location="/WEB-INF/jsp/fusionchart/" cache-period="31536000"/> <bean name="/user/**" class="egc.simp.vo.CartController"> <property name="createView" value="user/create"/> <property name="updateView" value="user/update"/> <property name="deleteView" value="user/delete"/> <property name="listView" value="user/list"/> <property name="redirectToListView" value="redirect:/user/list"/> <!-- 使用PropertiesMethodNameResolver来解析功能处理方法名 --> <!--property name="methodNameResolver" ref="propertiesMethodNameResolver"/--> </bean> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:viewClass="org.springframework.web.servlet.view.JstlView" p:prefix="/WEB-INF/jsp/" p:suffix=".jsp" /> <mvc:default-servlet-handler /> <!-- 处理静态资源 --> </beans> ------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc" 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/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-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/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> <context:component-scan base-package="egc" > <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" /> </context:component-scan> <!-- 引入jdbc配置文件 --> <context:property-placeholder location="classpath:jdbc.properties" /> <!--创建jdbc数据源 --> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="${driver}" /> <property name="url" value="${url}" /> <property name="username" value="${username}" /> <property name="password" value="${password}" /> </bean> <!-- 注解式事务处理 --> <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="false"/> <!-- myBatis文件 --> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="configLocation" value="classpath:MyBatis-Configuration.xml"></property> </bean> <!-- 配置SqlSessionTemplate --> <bean id="sqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate" scope="prototype"> <constructor-arg name="sqlSessionFactory" ref="sqlSessionFactory" /> </bean> <!-- 事务管理器 --> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource" /> </bean> <!-- dao层使用接口配置信息 --> <!-- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">--> <!-- <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />--> <!-- <property name="basePackage" value="egc.dao"></property>--> <!-- </bean>--> </beans> ----------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <typeAliases> <typeAlias type="egc.simp.controller.Cart" alias="Cart"></typeAlias> </typeAliases> <mappers> <mapper resource="egc/simp/controller/CartMapper.xml"/> </mappers> </configuration> ---------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.lzy.dao.UserMapper" > <select id="findById" resultType="Cart"> select * from cart where 1=1 <if test="id!=null"> and id =#{id} </if> </select> <select id="findById2" resultType="Cart"> select * from cart where 1=1 <choose> <when test="money>100"> and id =3 </when> <when test="money>200"> and id =4 </when> <otherwise> and id =5 </otherwise> </choose> </select> </mapper> -------------------------- 这是我写的例子 可以使用.
乔不思 2016-04-25
  • 打赏
  • 举报
回复
不会影响吧,肯定是有上限的吧。。。

25,984

社区成员

发帖
与我相关
我的任务
社区描述
高性能WEB开发
社区管理员
  • 高性能WEB开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧