ITeye博客

choelea的博客

choelea · 共 54 篇文章

[置顶] PreparedStatement 预编译原理

preparedStatement 有三大优点: 一.代码的可读性和可维护性. 二.PreparedStatement尽最大可能提高性能. 三.最重要的一点是极大地提高了安全性. 其中一和三的确很易理解。 关于性能的提高也是最有价值的这点, 我对其原理还有些质疑。 网上一: SQL 语句被预编译并且存储在 PreparedStatement 对象中,其后可以使用该对象高效地多次执行该语句。 问题:预编译在JDBC中完成的?还是数据库中?即便存在preparedStatement中,如果这个preparedStatement 对象不被缓存起来,其后又如何重复使用,多次执行? (一些webser…

2009-12-01 17:37 · 待确定 · 评论(1)

微服务 实时日志分析 FileBeat Elasticsearch Kibana

**目标:**实现微服务的归总方便分析 YUM edit To add the Beats repository for YUM: Download and install the public signing key: sudo rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch Create a file with a .repo extension (for example, beats.repo ) in your /etc/yum.repos.d/ directory and add the followin…

2016-07-10 16:39 · 评论(0)

Centos7 相关

开放端口: firewall-cmd --zone=public --add-port=80/tcp --permanent firewall-cmd --reload

2016-03-08 11:03 · 操作系统及服务器相关 · 评论(0)

Mysql 用 source 导入数据 注意变量设置

用mysqldump导出的数据文件,再用source导进去的时候常常有一些报错,百度了好几回,终于找到是mysql导出的注释语句问题,导出的文件常常 如下: 复制内容到剪贴板 0./*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 0./*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 0./*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 0./*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_…

2015-04-07 13:54 · 数据库 · 评论(0)

Hibernate Log

Hibernate cannot log the SQL and its parameters in the same line like you want . The logging provided by the Hibernate (by setting log4j.logger.org.hibernate.SQL=debug and log4j.logger.org.hibernate.type=trace in the log4j configuration) can only log the SQL and the parameters in the different line…

2015-04-03 20:41 · 数据库 · 评论(0)

Spring Roo 学习

运行:roo 出现异常: "Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5" 解决办法: Go into your Start Menu and type regedit into the search field. Navigate to the following path HKEY_LOCAL_MACHINE\Software\JavaSoft Right click on…

2015-01-09 10:30 · J2EE · 评论(0)

Brackets 使用

brackets 快捷键 有大用 星期二, 07/29/2014 - 10:38 — shipingzhong ctrl+alt+/ 调出快捷键的快捷键 ctrl+b 当选中一个文本时,会出现相同的文本,被高亮显示 按ctrl+b 相同的文本就全部获得了焦点 这样就可以同时更改这些相同的文本 ctrl+e 打开或关闭快速编辑 alt+u 注释 ctrl+/ 注释 ctrl+\ 注释 ctrl+d 复制一行 ctrl+shift+d 删除一行 alt+u 注释 ctrl+/ 注释 ctrl+\ 注释 ctrl+q 退出整个编辑器 ctrl+w 关闭当前文件 ctrl+e 查找文档 ctrl+k…

2014-12-27 18:08 · HTML · 评论(0)

Maven 相关

M2Eclipse 加入 eclipse org 组织后, maven出现好多问题。 具体可以参考文章:http://grumpyapache.blogspot.com/2011/08/mess-that-is-m2e-connectors.html 最后装了一个m2e-connector 后才没这些问题。 好晕, 有空再去弄清楚看看怎么回事

2014-12-08 13:28 · 工具使用 · 评论(0)

Linux 命令

Linux虽然是免费的,但它的确是一个非常优秀的操作系统,与MS-WINDOWS相比具有可靠、 稳定、速度快等优点,且拥有丰富的根据UNIX版本改进的强大功能。下面让我们一起来学习Linux的一些主要命令。有一点一定要注意,和dos命令不同 的是,Linux的命令(也包括文件名等等)对大小写是敏感的。 sbin 系统底层命令存放目录 bin 一般用户常用命令目录 一年多linux(字符界面)使用记录大概使用了以下命令,我按照自己意思把linux(centos)命令大概分为几种类型,有些也不是很合理的分类: 文件用户管理 ls -lh 显示权限 cp -r 复制文件 文件夹 mkdir tes…

2014-03-11 11:31 · 操作系统及服务器相关 · 评论(0)

PostgresSQL

PostgreSQL 列所有表结构的查询语句 SELECT tablename FROM pg_tables WHERE tablename NOT LIKE 'pg%' AND tablename NOT LIKE 'sql_%' ORDER BY tablename; 查询表t_appointment_apply表的字段信息 SELECT a.attnum,a.attname AS field,t.typname AS type,a.attlen AS length,a .atttypmod AS lengthvar,a.attnotnull AS notnull from pg_cla…

2013-02-18 17:19 · 数据库 · 评论(0)

Spring AOP @Transactional

@Transactional Propagation Defines how transactions relate to each other. Common options Required : Code will always run in a transaction. Create a new transaction or reuse one if availble. Requires_new : Code will always run in a new transaction. Suspend current transaction if one exist. Isolation…

2013-02-03 14:16 · J2EE · 评论(0)

Spring mvc Session

Using Sessions in Spring-MVC (including "scoped-proxies") On the Spring-MVC video training course , I described three different approaches to handling sessions in Spring. On the video, I mention that there is also a fourth way, but since the course was getting a bit long I said that I would cover t…

2013-01-31 15:41 · J2EE · 评论(0)

Log4j

#1.配置根Logger(日志记录的优先级从高到低ERROR,WARN,INFO,DEBUG)++++++++++++++++++++++++++++++ #appenderName就是指定日志信息输出到哪个地方。您可以同时指定多个输出目的地 log4j.rootLogger=INFO, A1 #2.配置日志信息输出目的地Appender+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #Log4j提供的appender有以下几种: #org.apache.log4j.ConsoleAppender(控制台), #org.ap…

2013-01-29 19:08 · J2EE · 评论(0)

MySQL Command

MySQL Command Line[mysql命令行常用命令] 第一招、mysql服务的启动和停止 net stop mysql net start mysql 第二招、登陆mysql mysql -u用户名 -p用户密码 mysql -uroot -p, 回车後提示你输入密码,输入12345,然後回车即可进入到mysql中了,mysql的提示符是: mysql> 注意,如果是连接到另外的机器上,则需要加入一个参数-h机器IP 指定地址和端口号登陆:mysql -uroot -p -h127.0.0.1 -P33366 修改root 用户密码: 用UPDATE直接编辑user表 mysql…

2012-11-23 16:05 · 数据库 · 评论(0)

sqlplus连接远程数据库

sqlplus连接远程数据库 1、首先要配置网络服务名。 在:E:\oracle9201\ora92\network\admin\tnsnames.ora 文件中 MYORACLE = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.20)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = myoracle) ) ) 其中 第一行的 MYORACLE 只是一个别名 具体配置可以参考 E:\oracle9…

2011-12-08 18:15 · 数据库 · oracle · 评论(0)