社区
高性能WEB开发
帖子详情
Tomcat配置多个域名会影响效率吗?
sheet_
2016-04-21 02:12:00
Tomcat配置多个域名会影响效率吗?
...全文
1020
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
打赏
举报
回复
不会影响吧,肯定是有上限的吧。。。
Nginx服务器搭建web集群+面试题+实操
本课程共分为16节,包括反向代理,分布式与集群的区别,搭建
tomcat
集群,集群的负载均衡策略,
域名
解析与
域名
绑定,同步异步请求,nginx
配置
详解,ip黑名单与白名单,伪静态,url重写规则,防盗链,课程复习总结等内容。实用性很强,帮学员掌握nginx的使用。
tomcat
域名
绑定设置
域名
绑定分为单
域名
绑定、多
域名
绑定,
配置
主要涉及到
tomcat
目录下conf/server.xml文件 一、单
域名
绑定 1、修改server.xml 大约105行的内容(不是必须修改,如果只是绑定一个
域名
不修改也没有什么
影响
,如果绑定
多个
域名
的话,当访问ip时,
会
直接访问defaultHost中
配置
的
域名
) 将原来的<Engine name="Catalina" def...
java进阶教程
Tomcat
核心原理解析
1、 课程简介
Tomcat
服务器是一个免费的开放源代码的Web 应用服务器,属于轻量级应用服务器,在中小型系统下被普遍使用,是目前javaEE开发使用的最主流的服务器之一 。本课程作为
Tomcat
高级课程, 从
Tomcat
基础、架构、Jasper、服务器
配置
、web应用
配置
、
Tomcat
管理
配置
、JVM、
Tomcat
集群、
Tomcat
安全、性能调优等各个方面进行了详细的讲解,并通过一个案例,讲解了
Tomcat
对Websocket的支持, 学习完该课程之后, 相信你对
tomcat
的整体架构, 内部原理, 系统调优有一个深刻的认识。本课程旨在通过
Tomcat
高级部分内容,使学员更加深入的理解
Tomcat
底层原理, 对
tomcat
的设计架构有一个深刻的认识 , 从而帮助我们对
Tomcat
进行更加深入到使用和优化,对系统的整体性能进行提升。 2、适应人群 具有一定
Tomcat
基础,对于javaWeb 基础有一定了解的学员。 3、课程亮点 本课程具备完整的
Tomcat
的体系结构, 从
Tomcat
的基础到架构、 服务
配置
、优化等方面都进行了详细的讲解。
高性能WEB开发
25,988
社区成员
4,373
社区内容
发帖
与我相关
我的任务
高性能WEB开发
高性能WEB开发
复制链接
扫一扫
分享
社区描述
高性能WEB开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章