共 10 篇文章 |
|
springboot自动判定空值null或空值的判断处理数据处理1,错误用法一: if (name == "") { //do something}2,错误用法二: if (name.equals("")) { //do something}3,错误用法三: if (!在这个表中有两个字段:User_i李海彬2018-03-201.8K0MySQL timestamp类型列值自动更新云数据库 SQL ServersqlMySQL中使用tim... 阅127 转0 评0 公众公开 23-09-11 17:46 |
spring boot的 yml和properties的对比。application.yml.useUnicode=true&zeroDateTimeBehavior=convertToNull&autoReconnect=truespring.datasource.username=rootspring.datasource.password=***spring.datasource.driver-class-name=com.mysql.jdbc.这里只说说 application.yml 和 application.properties 两个文件的优先级如果你的... 阅116 转0 评0 公众公开 20-04-23 14:08 |
-- spring boot --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <... 阅1 转自贾朋亮博客 公众公开 20-04-23 00:27 |
springboot+dynamic多数据源配置springboot+dynamic多数据源配置。 阅683 转0 评0 公众公开 20-04-23 00:14 |
} @DS(value = "slave_1") @GetMapping("find1") @ResponseBody public List<Map<String, Object>> find1(){ List<Map<String, Object>> list = jdbcTemplate.queryForList("select * from person");} @DS(value = "slave_2") @GetMapping("find2") @ResponseBody ... 阅1 转自印度阿三17 公众公开 20-04-16 23:00 |
服务治理:Spring Cloud Eureka负载均衡:Spring Cloud Ribbon熔断限流:Spring Cloud Hystrix服务调用:Spirng Cloud Feign网关服务:Spring Cloud Zuul/Gateway配置中心:Spring Cloud Config消息总线:Spring Cloud Bus消息驱动:Spring Cloud Stream服务追踪:Spring Cloud SleuthSpring Cloud网关 (Zuul/GateWay)spring: application: n... 阅265 转1 评0 公众公开 20-04-04 20:21 |
@Primary @Bean("sqlSessionFactory") public SqlSessionFactory sqlSessionFactory(@Qualifier("mysql") DataSource mysql, @Qualifier("oracle") DataSource oracle) throws Exception { SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); 阅239 转0 评0 公众公开 20-04-04 20:14 |
1、创建一个datasource包,新建DataSource1,DataSource2两个文件,通过注解来配置数据源。spring.datasource.data1.url=jdbc:mysql://127.0.0.1:3306/mysql-bootspring.datasource.data1.username=rootspring.datasource.data1.password=123123spring.datasource.data1.driver-class-name=com.mysql.jdbc. 阅59 转0 评0 公众公开 20-04-04 20:11 |
“?”字符仅被用于天(月)和天(星期)两个子表达式,表示不指定值当2个子表达式其中之一被指定了值以后,为了避免冲突,需要将另一个子表达式的值设为“?”1 <dependency>2 <groupId>org.quartz-scheduler</groupId>3 <artifactId>quartz</artifactId>4 <version>2.3.0</version>5 </depende... 阅42 转0 评0 公众公开 19-10-10 15:45 |
使用idea搭建Spring boot+jsp的简单web项目。创建spring boot项目,使用idea自带的spring initializr创建Spring boot的maven项目(我是先创建了一个空的项目)。<groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId></dependency><!#Spring boot视图配置spring.mvc.... 阅449 转3 评0 公众公开 19-09-06 21:14 |