改回配置文件,修复小BUG

This commit is contained in:
柏码の讲师 2023-10-18 19:37:06 +08:00
parent 1eb8578dc8
commit 40c652cfa1
2 changed files with 4 additions and 7 deletions

View File

@ -83,11 +83,11 @@ public class ImageServiceImpl extends ServiceImpl<ImageStoreMapper, StoreImage>
.object(imageName)
.build();
try {
String avatar = mapper.selectById(id).getAvatar();
client.putObject(args);
if(mapper.update(null, Wrappers.<Account>update()
.eq("id", id)
.set("avatar", imageName)) > 0) {
String avatar = mapper.selectById(id).getAvatar();
this.deleteOldAvatar(avatar);
return imageName;
} else {

View File

@ -4,20 +4,17 @@ springdoc:
swagger-ui:
operations-sorter: alpha
spring:
data:
redis:
host: 192.168.0.8
mail:
host: smtp.163.com
username: javastudy111@163.com
password: QGLYGBVECIASGPWQ
rabbitmq:
addresses: 192.168.0.8
addresses: localhost
username: admin
password: admin
virtual-host: /
datasource:
url: jdbc:mysql://192.168.0.8:3306/test
url: jdbc:mysql://localhost:3306/test
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
@ -43,7 +40,7 @@ spring:
credentials: false
methods: '*'
minio:
endpoint: 'http://192.168.0.8:9000'
endpoint: 'http://localhost:9000'
username: 'minio'
password: 'password'
weather: