上一页 1 ··· 71 72 73 74 75 76 77 78 79 ··· 112 下一页
摘要: 1.ApplicationContext.xml 是spring 全局配置文件,用来控制spring 特性的 2.dispatcher-servlet.xml 是spring mvc里面的,控制器、拦截uri转发view 3.一个bean如果在两个文件中都被定义了(比如两个文件中都定义了compon 阅读全文
posted @ 2018-04-04 09:49 甜菜波波 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 如何在类中应用配置文件 优先级: 当前目录子目录的/config > 当前目录 > classpath的/config包 > classpath的根目录 即:越靠近的优先级越高 **指定配置文件 @PropertySource 和 SpringApplication.setDefaultProper 阅读全文
posted @ 2018-04-03 17:28 甜菜波波 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Mybatis属于半自动ORM,在使用这个框架中,工作量最大的就是书写Mapping的映射文件,由于手动书写很容易出错,我们可以利用Mybatis-Generator来帮我们自动生成文件。 1、相关文件 关于Mybatis-Generator的下载可以到这个地址:https://github.com 阅读全文
posted @ 2018-03-30 15:25 甜菜波波 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 1.控制台打印sql语句 只要在application.properties 中加入<configuration scan="true" scanPeriod="60 seconds" debug="false"> <contextName>logback</contextName> <!--输出到 阅读全文
posted @ 2018-03-30 15:16 甜菜波波 阅读(11894) 评论(0) 推荐(0) 编辑
摘要: springboot官方文档地址https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-custom-log-configuration spring官方地址https: 阅读全文
posted @ 2018-03-30 15:13 甜菜波波 阅读(26045) 评论(0) 推荐(0) 编辑
摘要: 在pom.xml里配置 生成的包就可以在服务器上 使用命令启动:java -jar demo.jar 阅读全文
posted @ 2018-03-27 12:00 甜菜波波 阅读(176) 评论(0) 推荐(0) 编辑
摘要: <context:component-scan base-package="com.dubbo" /> <mvc:annotation-driven /> 阅读全文
posted @ 2018-03-07 15:12 甜菜波波 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 提供方启动时广播自己的地址。 消费方启动时广播订阅请求。 提供方收到订阅请求时,单播自己的地址给订阅者,如果设置了unicast=false,则广播给订阅者。 消费方收到提供方地址时,连接该地址进行RPC调用。 1 2 3 或者 1 为了减少广播量,Dubbo缺省使用单播发送提供者地 阅读全文
posted @ 2018-03-07 13:54 甜菜波波 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 前言 在网站的用户达到一定规模后,数据库因为负载压力过高而成为网站的瓶颈。幸运的是目前大部分的主流数据库都提供主从热备功能,通过配置两台数据库主从关系,可以将一台数据库的数据更新同步到另一台服务器上。网站利用数据库的这一功能,实现数据库读写分离,从而改善数据库负载压力。如下图所示: 应用服务器在写数 阅读全文
posted @ 2018-03-06 11:28 甜菜波波 阅读(374) 评论(0) 推荐(0) 编辑
摘要: ServletContext servletContext = request.getSession().getServletContext(); String title= servletContext.getInitParameter("title"); 阅读全文
posted @ 2018-03-05 18:04 甜菜波波 阅读(456) 评论(0) 推荐(0) 编辑
上一页 1 ··· 71 72 73 74 75 76 77 78 79 ··· 112 下一页