When starting first:
Article Directory
- 1. Port occupation
- 2. The configuration file cannot be obtained
- 3. The database configuration does not match the actual
- 4. When there are multiple environments, the active assignment of the profile
- 5. Pom dependency download failed
- 6.redis is used in springboot
- 7. When used in combination with rabbitmq
1. Port occupation
The solution is to close other programs that occupy the port
2. The configuration file cannot be obtained
3. The database configuration does not match the actual
The most common errors are: database password, database time zone, encoding,
4. When there are multiple environments, the active assignment of the profile
查看profile.active设置的值时候正确,这一般关系到你选中的数据库,以及对应的环境变量全局配置
5. Pom dependency download failed
The most common is that the pom dependency cannot be downloaded. The common solution is to set the mirror mirror configuration in maven's setttings.xml. You can use the aliyun mirror. For
example: (Solve the problem of slow dependency download or failure to download)
<mirrors>
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>
</mirrors>
6.redis is used in springboot
When starting, check whether redis has been started successfully, otherwise, an error will be reported when starting. (Redis generally mainly stores session information and token information. There are also some caches (such as data dictionary cache))
7. When used in combination with rabbitmq
There is a problem, the problem of the order case: the
solution:
add in the startup class:
@Primary
@Bean
public TaskExecutor primaryTaskExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
return executor;
}
. . . . to be continued