Skip to content

Commit

Permalink
feat: 上传文件时大小限制为1GB
Browse files Browse the repository at this point in the history
  • Loading branch information
lichong-a committed Sep 21, 2024
1 parent 05726ce commit 2d4b383
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class Course extends BaseEntity {
@Schema(description = "课程封面文件")
private Storage courseCoverStorage;

@ManyToMany
@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(
name = "tb_course_course_attachment_storages",
joinColumns = @JoinColumn(name = "course_id"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public class User extends BaseEntity implements UserDetails {
inverseJoinColumns = @JoinColumn(name = "role_id"))
private Set<Role> roles;

@OneToMany(mappedBy = "user")
@OneToMany(mappedBy = "user", fetch = FetchType.EAGER)
@ToString.Exclude
private Set<Order> orders;

Expand Down
4 changes: 4 additions & 0 deletions starter/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ spring:
name: portal-server
config:
import: optional:classpath:docker/.env[.properties]
servlet:
multipart:
max-file-size: 1GB
max-request-size: 1GB
cloud:
nacos:
discovery: #启用 spring cloud nacos discovery
Expand Down

0 comments on commit 2d4b383

Please sign in to comment.