学习写代码呀

导航

2020年10月20日 #

BeanFactory not initialized or already closed - call 'refresh' before access

摘要: BeanFactory not initialized or already closed - call 'refresh' before access web项目默认会去寻找spring-mvc.xml文件,没有配置就会报错。 改成: <context-param> <param-name>con 阅读全文

posted @ 2020-10-20 09:45 学习写代码呀 阅读(863) 评论(0) 推荐(0) 编辑

2020年10月17日 #

主键生成策略

摘要: 1、JPA提供的四种标准用法为TABLE,SEQUENCE,IDENTITY,AUTO。 a,TABLE:使用一个特定的数据库表格来保存主键。 b,SEQUENCE:根据底层数据库的序列来生成主键,条件是数据库支持序列。 c,IDENTITY:主键由数据库自动生成(主要是自动增长型) d,AUTO: 阅读全文

posted @ 2020-10-17 14:23 学习写代码呀 阅读(230) 评论(0) 推荐(0) 编辑

安装mysql-------------卸载mysql

摘要: 卸载: https://blog.csdn.net/qq_41140741/article/details/81489531 https://blog.csdn.net/websphere_zxf/article/details/81661110 删除已注册的mysql服务: 1、开始——运行——c 阅读全文

posted @ 2020-10-17 14:20 学习写代码呀 阅读(107) 评论(0) 推荐(0) 编辑

2020年10月14日 #

@Autowired注解的几种方式 --依赖注入

摘要: *@Autowired注入成员变量,利用field反射注入,要等类加载完了才注入bean;@Autowired注入构造方法中,利用构造器注入,有先后依赖关系;setter属性注入,setter代码冗长,不能将属性设置为final。 private A a; @Autowired public c(A 阅读全文

posted @ 2020-10-14 09:48 学习写代码呀 阅读(4154) 评论(0) 推荐(0) 编辑

2020年9月25日 #

spring bean: Bean property 'users' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

摘要: Bean property 'users' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? 错误原因 阅读全文

posted @ 2020-09-25 10:27 学习写代码呀 阅读(966) 评论(0) 推荐(0) 编辑

2020年9月23日 #

【linux】yum install gitlab-ci-multi-runner报错:No more mirrors to try

摘要: 解决方法: 1、yum clean all 2、yum makecache 3.再给yum来个升级【可选】。 yum -y update 重装 阅读全文

posted @ 2020-09-23 10:25 学习写代码呀 阅读(247) 评论(0) 推荐(0) 编辑

2020年7月3日 #

常见sql语句总结

摘要: 创建表:CREATE TABLE T_Person(FName VARCHAR(20),FAge NUMBER(10) DEFAULT '20',FId INT NOT NULL,PRIMARY KEY('FId'))CREATE TABLE T_Employee(EName VARCHAR(20) 阅读全文

posted @ 2020-07-03 14:40 学习写代码呀 阅读(239) 评论(0) 推荐(0) 编辑

2020年6月29日 #

HttpClient和HttpURLConnection简单例子

摘要: HttpURLConnection是jdk自带的封装类,原始,但是效率更高。HttpClient是apache对HttpURLConnection的再封装,包括了请求头,返回对象等。 HttpClient和HttpURLConnection对比:https://blog.csdn.net/M_Jac 阅读全文

posted @ 2020-06-29 21:27 学习写代码呀 阅读(314) 评论(0) 推荐(0) 编辑

springboot JPA+mybatis双数据源

摘要: pom文件依赖:<spring.boot.version>2.0.6.RELEASE</spring.boot.version> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>s 阅读全文

posted @ 2020-06-29 20:55 学习写代码呀 阅读(409) 评论(0) 推荐(0) 编辑

gradle配置

摘要: 1、gradle项目gradle-wrapper.properties gradle-wrapper.properties存放的是项目自身推荐的gradle版本,等。比如:distributionUrl=https\://services.gradle.org/distributions/gradl 阅读全文

posted @ 2020-06-29 20:53 学习写代码呀 阅读(544) 评论(0) 推荐(0) 编辑