Skip to content

Commit

Permalink
Enhance readability of configuration file and remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
keke125 committed May 25, 2023
1 parent 2a53051 commit 0554881
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.tika.Tika;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;

import java.io.File;
import java.io.IOException;
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/keke125/pixel/views/signup/SignupView.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.vaadin.flow.server.auth.AnonymousAllowed;
import org.apache.tika.Tika;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;

import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -67,7 +66,7 @@ public class SignupView extends VerticalLayout {
// The default image size limit for new sign-up users
// you can modify this value
// @Value("{user.image.size.limit:30}")
private double defaultImageSizeLimit;
private final double defaultImageSizeLimit;
private final Span dropLabel;
private final EmailField emailField;
private final Span errorMessage;
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ spring.datasource.url=${PAFW_DB_URL}
spring.datasource.username=${PAFW_DB_USER}
spring.datasource.password=${PAFW_DB_PASSWORD}
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver

# upload limit
# you need modify this value if you want upload bigger image
spring.servlet.multipart.max-file-size=30MB
Expand All @@ -25,8 +26,11 @@ app.maxAvatarSizeInMegaBytes=3
# The default image size limit for new sign-up users
# you can modify this value
app.newSignupImageSizeLimit=30
# security
# password encoder
# BCrypt pbkdf2 argon2
app.idForEncode=argon2
# website detail
# website location country
app.webCountry=Taiwan
# website name
Expand All @@ -42,6 +46,7 @@ app.adminContactEmail=admin@example.com
# login form additional information
app.loginInfoTC=\u5982\u679C\u9047\u5230\u767B\u5165\u554F\u984C\uFF0C\u8ACB\u806F\u7E6B admin@example.com
app.loginInfoEN=Contact admin@example.com if you're experiencing issues logging into your account.
# other setting
logging.level.org.atmosphere=warn
spring.mustache.check-template-location=false
# Launch the default browser when starting the application in development mode
Expand Down

0 comments on commit 0554881

Please sign in to comment.