如果程序启动失败,可以重新导一下项目,加载maven,可能一不小心就成功了
1.1 插件问题
spring-boot-maven-plugin
2
1.1.3 依赖下载问题
略
1.2项目启动不了,报错
[ERROR] Failed to execute goal on project jt-system: Could not resolve dependencies for project …
总结、在父项目下有的子项目在首次运行clean 和install前应该先运行父项目的clean和install
1.2 Git
1.2.1 Share 失败
▪ 编目名编写不规范
▪ 账户配置不正确
▪ 网络不通
▪ 远程仓库名已经存在
1.2.2 Push 失败
▪ 本地库版本与远程库版本不一致
▪ 网络不通
▪ 没有权限
1.3 启动类类名红色下划线
启动类没有放在包下
2 SpringBoot
2.1 网络
2.2 启动
2.2.1 @SpringBootConfiguration
2.2.2 Multipl @SpringBootConfiguration
2.2.3 @Autowired red error
2.2.4 ApplicationContext
2.2.5 BeanCreationExeption
2.3 连接池
2.3.1 ‘url’ attribute
可能nacos配置文件书写错误
2.3.2 CommunicationException
2.3.3 Access Denied
2.4 MyBatis
2.4.1 NullPointerException
2.4.2 Could not autowired
2.4.3 SqlSessionFactory
2.4.4 BeanInstantiationException
2.4.5 SAXParseException
2.4.6 UnstatisfiedDependencyException
2.4.7 SqlSyntaxErrorException
2.4.8 BindingException
▪ 映射语句找不到
▪ SQL 语句定义到错误的 SQL 元素中
▪ SQL 语句定义了错误的元素中
2.4.9 BadSalGrammarException
2.4.10 ReflectionException
2.4.11 IllegalArgumentException
Statements contains
2.4.12 SQLIntegrityConstraint
2.4.13 No Result Map
2.4.14 MyBatisSystemException
2.4.15 ClassNotFoundException
2.4.16 Create Directory
2.5 Spring Web
2.5.1 启动&端口
2.5.2 端口被占用
2.5.3 404
2.5.4 500
2.5.5 InvalidDefinitionException
2.5.6 Field value not found
2.5.7 400
例如:
2.5.8 405
2.5.9 415
2.5.10 No Convert Found
2.5.11 Failed to Deserialization
2.5.12 No Serializer found
3 Shiro
3.1 Filters
3.2 AuthenticationException
3.3 IncorrectCredentialsException
3.4 Logout test
3.5 CrytoException
其中 key 的生成,可参考如下代码:
@Test
void testGeneratorKey() throws NoSuchAlgorithmException {
KeyGenerator keyGenerator=KeyGenerator.getInstance("AES");
SecretKey secretKey = keyGenerator.generateKey();
String key=Base64.encodeToString(secretKey.getEncoded());
System.out.println(key);
}
4 DBPMS Project
4.1 Blocked By Cors
APP启动失败
***************************
APPLICATION FAILED TO START
***************************
Description:
Field seggService in com.cy.Controller.SeggController required a bean of type 'com.cy.service.SeggService' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'com.cy.service.SeggService' in your configuration.
1.在启动类上加@ComponentScan(basePackages=“com.xx.mapper”) 2.在service类上加@Service
18
@Test
void testGeneratorKey() throws NoSuchAlgorithmException {
KeyGenerator keyGenerator=KeyGenerator.getInstance(“AES”);
SecretKey secretKey = keyGenerator.generateKey();
String key=Base64.encodeToString(secretKey.getEncoded());
System.out.println(key);
}
4 DBPMS Project
4.1 Blocked By Cors
5 总结(Summary