社区
高性能WEB开发
帖子详情
Tomcat配置多个域名会影响效率吗?
sheet_
2016-04-21 02:12:00
Tomcat配置多个域名会影响效率吗?
...全文
1024
2
打赏
收藏
Tomcat配置多个域名会影响效率吗?
Tomcat配置多个域名会影响效率吗?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用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
打赏
举报
回复
不会影响吧,肯定是有上限的吧。。。
Tomcat
安装搭建基础实战精讲(大神必经之路)
以下是
Tomcat
的
配置
方法: 下载最新版本的
Tomcat
下载完安装文件后,将压缩文件解压到一个方便的地方,比如 Windows 下的 C:\apache-
tomcat
-5.5.29 目录或者 Linux/Unix 下的 /usr/local/apache-
tomcat
-...
tomcat
一台服务器
多个
域名
配置
文件,同一服务器
多个
域名
tomcat
配置
同一服务器
多个
域名
tomcat
配置
内容精选换一换华为云帮助中心,为用户提供产品简介、价格说明、购买指南、用户指南、API参考、最佳实践、常见问题、视频帮助等技术文档,帮助您快速上手使用华为云服务。SSL证书签发...
Linux下部署
多个
Tomcat
多个
域名
一、安装JDK 1、安装jdk-7u79-linux-x64.rpm...
Tomcat
的主
配置
文件,该文件中包含很多主要元素,比如Service、Connector、Host等,这些元素都
会
创建软件"对象"、排序及进程管道中设置的这些元素嵌套方,使我们可以执行...
Tomcat
服务的部署和优化
Tomcat
是 Java 语言开发的,
Tomcat
服务器是一个免费的开放源代码的 Web 应用服务器,是 Apache 软件基金
会
的 Jakarta 项目中的一个核心项目,由 Apache、Sun 和其他一些公司及个人共同开发而成。
Tomcat
属于轻量级...
Tomcat
8性能优化
为了节省SOCKET创建的昂贵代价,WEB服务器
会
尝试维护一个永久TCP连接到servlet容器,并且在
多个
请求和响应周期过程
会
重用连接。我们一般是使用Nginx+
Tomcat
的架构,所以用不着AJP协议,把AJP连接器禁用。修改conf下...
高性能WEB开发
25,985
社区成员
4,366
社区内容
发帖
与我相关
我的任务
高性能WEB开发
高性能WEB开发
复制链接
扫一扫
分享
社区描述
高性能WEB开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章