1 <!--下面代码的配置会导致这个警告-->2<!--Cannot find template location: classpath:/templates/ (please add some templates or check your Thymel-->3 <!--<resource>-->4 <!--<directory>src/main/resources</directory>-->5 <!--<includes>-->6 <!--<include>**/*.yml</include>-->7 <!--<include>**/*.xml</include>-->8 ...
对于开源的项目来说的好处就是我们遇到什么问题可以通过看源码来解决。比如近期有个同事问我说,为啥JdbcTemplate中只有在Error的时候才打印出sql语句呢。我一想,这和log的配置有关系吧。 我们的系统中使用了slf4j作为日志管理工具,之前也好像看到过项目工程中配置的日志级别是error的,所以当代码错误时打印出sql语句应该也属于正常。但是想要正常运行时也打印出sql语句,相比和配置有关,但是应该配置那个级别呢? 应该要看下J...
数据库 tempdb 的日志已满 执行sql 语句,中间没有用到临时表 提示服务器: 消息 9002,级别 17,状态 2,行 1 数据库 tempdb 的日志已满。请备份该数据库的事务日志以释放一些日志空间。 网上找了下解决方案,大体是扩大临时库的日志文件的大小解决的 解决过数据库 tempdb 的日志已满
执行sql 语句,中间没有用到临时表提示服务器: 消息 9002,级别 17,状态 2,行 1
数据库 tempdb 的日志已满。请备份该数据库的事务日志以释放一些...
public <T> T execute(PreparedStatementCreator psc, PreparedStatementCallback<T> action)2 throws DataAccessException {3 4 Assert.notNull(psc, "PreparedStatementCreator must not be null");5 Assert.notNull(action, "Callback object must not be null");6 if (logger.isDebugEnabled()) {7 String sql = getSql(psc);8 logger.debug("Executing prepared...
测试用例
我们分别在用户数据库(testpage),tempdb中创建相似对象t1,#t1,并在tempdb中创建创建非临时表,然后执行相应的insert脚本(用以产生日志),并记录执行时间用以比较用以比较说明tempdb”快”
Code
用户数据库testpageuse testpage
go
create table t1
(
id int identity(1,1) not null,
str1 char(8000)
)declare @t datetime2=sysutcdatetime()
declare @i int
set @i=1
while (@i<100000)
begin
insert into t1 select @i,aa...
执行sql 语句,中间没有用到临时表提示服务器: 消息 9002,级别 17,状态 2,行 1
数据库 tempdb 的日志已满。请备份该数据库的事务日志以释放一些日志空间。网上找了下解决方案,大体是扩大临时库的日志文件的大小解决的
解决过程:
查看了下数据库的属性,是自动增长,不指定文件大小上限。
在网上Google了很久,试了些方法都不行;数据库所在磁盘还有很大的可用空间,试着下重药了。
直接把tempdb的数据文件和日志文件的大小改为...
proc [dbo].[SYS_DB_Delete_Log]
(@DBName varchar(50)
)
as
-- 删除数据库日志
--Create by HDL 20141217
-- 用于将数据库日志文件删除重新创建
-- SYS_DB_Delete_Log ‘ImportDB‘
-- update by hdl 20170928 处理删除日志后还原成原来模式
--update by hdl 20191209 修改处理TempDb
begin/*
use Z3
declare @ExecAll varchar(max)
select @ExecAll=ISNULL(@ExecAll+‘‘,‘‘)+‘exec SYS_DB_Delete_Log ‘+ name +‘
‘ from s...
/* load collection cc.unmi.test.model.Post.securities */ selectsecurities0_.post_id as post1_7_1_,security1_.shareclassid as sharecla1_16_0_,security1_.company_id as company2_16_0_,fromPost_Security_Relationship securities0_inner joinunmi.securities security1_on securities0_.shareclassid=security1_.shareclassidwheresecurities0_.post_id=?hibernate.show_sql 控制全局是否显示生成的 SQL 语句,hibernate...
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpRequest;
import org.springframework.http.client.ClientHttpRequestExecution;
import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.http.client.ClientHttpResponse;public class...
写在前面的话
相关背景及资源:
曹工说Spring Boot源码(1)-- Bean Definition到底是什么,附spring思维导图分享
曹工说Spring Boot源码(2)-- Bean Definition到底是什么,咱们对着接口,逐个方法讲解
曹工说Spring Boot源码(3)-- 手动注册Bean Definition不比游戏好玩吗,我们来试一下
曹工说Spring Boot源码(4)-- 我是怎么自定义ApplicationContext,从json文件读取bean definition的?
曹工说Spring Boot源码(5)-- 怎么...