1. 数据库事物隔离级别:
https://www.jianshu.com/p/c9a0d35839ac
2.mysql搜索引擎
https://www.jianshu.com/p/6c03c0d84518
3.常见报错以及可能的解决方法
(1)expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
web.xml缺少listener
(2)连接db报错——“org.springframework.beans.NotWritablePropertyException: Invalid property 'configurationClass' of bean class”
使用不同的data source class,其中driver/url/name/passwd变量名可能不一样。
springmvc连接db的方式:
使用org.springframework.jdbc.datasource.DriverManagerDataSource
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost:3306/springdatajpa"/>
<property name="username" value="root"/>
<property name="password" value="123456"/>
</bean>
使用线程池com.mchange.v2.c3p0.ComboPooledDataSource
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="oracle.jdbc.driver.OracleDriver" />
<property name="jdbcUrl" value="jdbc:oracle:thin:@xxxxxx" />
<property name="user" value="username" />
<property name="password" value="passwd" />
<property name="initialPoolSize" value="5" />
<property name="minPoolSize" value="5" />
<property name="maxPoolSize" value="20" />
<property name="preferredTestQuery" value="SELECT 1 FROM DUAL" />
<property name="testConnectionOnCheckout" value="true" />
<property name="idleConnectionTestPeriod" value="0" />
</bean>
4.环境问题:
(1) windows环境下端口占用
netstat -ano|findstr "8080"
tasklist|findstr 3112
taskkill /f /t /im javaw.exe
(2)eclipse svn 连不上: eclipse -> windows -> preference -> 搜索“network connections” -> 设置Active Provider:Direct
(3)ObjID已经占用的问题:删掉tomcat重新配置
(4)找不到tomcat下的servlet.jar的包的解决办法:
项目名右键 -> properties ->java build path -> library -> add library -> server Runtime -> Apache Tomcat v7.0 -> finish
(5)eclipse中tomcat的add and remove中找不到项目: properties --> project fact --> 勾选 Dynamic Web Module, Java, JavaScript -->Apply
(6)springmvc web项目名称查看:右键项目名称 --> properties --> web project setting --> context root所示内容即为web项目名
(7)neo4j, connection refuse: no further information: 原因是本地安装的neo4j没有启动,启动即可
(8)访问web项目时是否需要写项目名的问题:如果是springboot项目,可不写,因为springboot默认配置是不需要写项目名(即:server.servlet.context-path=/),如果想要在访问的url写上项目名,则需要在配置文件中增加 配置(server.servlet.context-path=/ppp,此时访问url为: localhost:8080/ppp/xxx)
(9)Method org.postgresql.jdbc.PgConnection.createClob() is not yet implemented
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=true
(10)反序列化问题
原因是需要无参的构造函数,如果自己定义了带参数的构造函数,默认无参的构造函数会失效。具体详见:
http://blog.csdn.net/zmq52007/article/details/9136244
(11)java.lang.AbstractMethodError: null
jar包版本不能高于parent版本,具体详见:
https://blog.csdn.net/kxj19980524/article/details/87890876
(12)整合swagger后首次请求报错:For input string: ""
解决办法是在配置文件添加一条这样的配置:logging.level.io.swagger.models.parameters.AbstractSerializableParameter = error
(13) MERGE INTO注意事项: https://stackoverflow.com/questions/7577480/sql-oracle-ora-00969-missing-on-keyword, 同时select从前端传来的Object 的field的时候需要取别名,否则会报identifier xxx
MERGE INTO table_nm CM
USING (
<foreach collection="list" item="item" index="index" separator="union">
select #{item.field1, jdbcType=VARCHAR} as field1,
#{item.field2, jdbcType=VARCHAR} as field2
from dual
</foreach>) t
ON (join conditions)
WHEN MATCHED THEN
UPDATE SET CM.xxx= t.xxx
WHEN NOT MATCHED THEN
INSERT (xxx, xxx) VALUES (t.field1, t.field2)
5. openapi 3.0 文档规范: https://fishead.gitbooks.io/openapi-specification-zhcn-translation/content/versions/3.0.0.zhCN.html#requestBodyObject
6.springboot整合shiro: https://www.jianshu.com/p/9099dded3265
7. oralce service_name和SID的区别: https://www.jianshu.com/p/8b79a01f990c