OwlFocus

Via


  • 首页

  • 分类

  • 归档

  • 标签

  • 搜索
close
OwlFocus

Hello World

发表于 2016-12-29

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

OwlFocus

Jconsole监视dubbo服务

发表于 2016-12-27 | 分类于 program

Spring ScriptUtils

使用Spring ScriptUtils 批量执行Sql语句,如批量执行update table1 set status=0, dprice=55 where id in (9600980);insert into table1 (dprice,status) values(46,0),(55,1);这两条语句。

方法

1
2
3
4
5
6
7
8
9
10
11
public void executeSqlScript(Connection connection,StringBuffer sql)throws SQLException{
try {
connection.setAutoCommit(false);//设置为手工提交模式
ScriptUtils.executeSqlScript(connection, new ByteArrayResource(sql.toString().getBytes()));
connection.commit();//提交事务
} catch (SQLException e) {
connection.rollback();
}finally{
connection.close();
}
}
OwlFocus

Centos桥接网络配置

发表于 2016-12-01 | 分类于 linux

Centos7 桥接网络配置

编辑配置文件

1
vi /etc/sysconfig/network-scripts/ifcfg-eth0

添加修改以下内容

HWADDR=08:00:27:d4:5e:11
TYPE=Ethernet
BOOTPROTO=static #启用静态IP地址
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s3
UUID=3c092d5f-fda6-403b-1122-d9bbd7280da5
ONBOOT=yes #开启自动启用网络连接
IPADDR0=192.168.3.236 #设置IP地址
PREFIXO0=24 #设置子网掩码
GATEWAY0=192.168.3.1 #设置网关
DNS1=218.85.157.99 #设置主DNS
DNS2=218.85.157.99 #设置备DNS

保存退出

1
:wq!

重启网络

1
systemctl restart network.service
1…535455
ljzhuanjiao@gmail.com

ljzhuanjiao@gmail.com

在快节奏时代,我不能在慢中消亡!!!

163 日志
5 分类
53 标签
© 2016 - 2018 ljzhuanjiao@gmail.com
由 Hexo 强力驱动
主题 - NexT.Pisces