springboot的多种配置方式java配置主要靠java类和一些注解,比较常用的注解有:@Configuration:声明一个类作为配置类,代替xml文件@Bean:声明在方法上,将方法的返回值加入Bean容器,代替标签@Value:基本类型或String属性注入@PropertySource:指定外部属性文件后面以Druid连接池配置为例,数据库名称为springboot_test方式一&l
分类:
编程语言 时间:
2020-10-24 11:45:58
阅读次数:
86
springboot的多种配置方式 java配置主要靠java类和一些注解,比较常用的注解有: @Configuration :声明一个类作为配置类,代替xml文件 @Bean :声明在方法上,将方法的返回值加入Bean容器,代替 标签 @Value :基本类型或String属性注入 @Proper ...
分类:
编程语言 时间:
2020-10-22 22:48:39
阅读次数:
28
#!/bin/bash # 先备份原来的网卡配置文件 find /etc/sysconfig/network-scripts/ -type f -name "ifcfg*"|xargs cp -t /tmp # 定义要使用的变量 network_file_path=/etc/sysconfig/ne ...
分类:
其他好文 时间:
2020-10-21 21:00:30
阅读次数:
25
实战Redis集群 # 创建一个自定义的网络名词叫redis docker network create --subnet 172.18.0.0/16 --gateway 172.18.0.1 redis # 宿主机挂载文件 for port in $(seq 1 6); do mkdir -p / ...
分类:
其他好文 时间:
2020-10-19 22:48:19
阅读次数:
22
日志安全中: 5140,5142,5143,5144, 5140 A network share object was accessed 5142 A network share object was added. 5143 A network share object was modified 5 ...
分类:
其他好文 时间:
2020-10-19 22:39:10
阅读次数:
16
组合Java配置 在XML中,我们可以使用<import/>标签,在一个XML文件中引入另一个XML文件,在Java类中,我们同样可以在一个配置类中用@Import引入另一个配置类,被引入的配置类中的@Bean也会加载到spring容器。代码如下: @Configuration public cla ...
分类:
编程语言 时间:
2020-10-19 22:26:01
阅读次数:
23
使用Commons Configuration可以很好的管理我们的配置文件的读写。 官网:http://commons.apache.org/proper/commons-configuration/ 需要使用到的包有:commons-collections、commons-configuratio ...
分类:
Web程序 时间:
2020-10-18 16:48:30
阅读次数:
35
第一添加log4net.config,这里配置包括信息提示写入,错误信息写入,控制台消息展示 <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="log4net" type="l ...
2020 IT邦幫忙鐵人賽 Kubernetes 原理分析系列文章 kubernetes 探討 Container & Open Container Initiative Container Runtime Interface Container Network Interface Containe ...
分类:
其他好文 时间:
2020-10-18 09:39:20
阅读次数:
21
怎么安装参见CentOS6.9安装Nexus3.19 ,接下来就是如何配置。打开我们安装后的nexus界面,用admin账号登陆,点击Server administration and configuration按钮: 点击Repository 我们可以看到nexus默认给我建好了一些仓库,其中包括 ...
分类:
其他好文 时间:
2020-10-18 09:27:43
阅读次数:
24