社区
高性能WEB开发
帖子详情
Tomcat配置多个域名会影响效率吗?
sheet_
2016-04-21 02:12:00
Tomcat配置多个域名会影响效率吗?
...全文
1042
2
打赏
收藏
Tomcat配置多个域名会影响效率吗?
Tomcat配置多个域名会影响效率吗?
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用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
安全、
域名
配置
、等。
NULL 博文链接:https://mljavalife.iteye.com/blog/506038
详解
Tomcat
多
域名
配置
(
多个
项目共用80端口)
本篇文章主要介绍了
Tomcat
多
域名
配置
(
多个
项目共用80端口),具有一定的参考价值,感兴趣的小伙伴们可以参考一下
Tomcat
基于
域名
的虚拟主机.doc
tomcat
的8005端口是用来关闭服务的,如果服务关闭不了那就执行下边操作,如果服务能正常访问,能正常关闭,那就不需要执行下边操作
Tomcat
+IIS整合
配置
文件
非常好的
TOMCAT
+IIS整合方案,这个压缩包里包含了各种
配置
文件,有需要的兄弟们可以好好看看和测试一下呀。
Apache
Tomcat
整合教程
Apache
Tomcat
集群,
多个
参考资料整合教程。
高性能WEB开发
25,980
社区成员
4,366
社区内容
发帖
与我相关
我的任务
高性能WEB开发
高性能WEB开发
复制链接
扫一扫
分享
社区描述
高性能WEB开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章