Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/java/com/example/FixLog/domain/post/Post.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,6 @@ public void changeExtraContent(String newExtraContent){
public void updateEditedAt(LocalDateTime newLocalDateTime){
this.editedAt = newLocalDateTime;
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class SearchPostDto {
private Long postId;
private String title;
private String content;
private String coverImageUrl;
private String writerNickname;
private String writerProfileImage;
private List<String> tags; // 예: [“spring-boot”, “jwt”, “java”]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public Page<SearchPostDto> searchByKeywordAndTags(String keyword, List<String> t
.postId(p.getPostId())
.title(p.getPostTitle())
.content(p.getProblem().length() > 200 ? p.getProblem().substring(0, 200) + "…" : p.getProblem())
.coverImageUrl(p.getCoverImage())
.writerNickname(p.getUserId().getNickname())
.writerProfileImage(p.getUserId().getProfileImageUrl())
.tags(p.getPostTags().stream().map(pt -> pt.getTagId().getTagName()).toList())
Expand Down
48 changes: 24 additions & 24 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@ spring.application.name=FixLog
## Spring Security
#logging.level.org.springframework.security=DEBUG

##### [PROD] #####
server.port=8083

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=${MYSQL_URL}
spring.datasource.username=${MYSQL_USERNAME}
spring.datasource.password=${MYSQL_PASSWORD}

spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
spring.jpa.properties.hibernate.format_sql=true

cloud.aws.credentials.access-key=${AWS_ACCESS_KEY_ID}
cloud.aws.credentials.secret-key=${AWS_SECRET_ACCESS_KEY}
cloud.aws.region.static=${AWS_REGION}
cloud.aws.s3.bucket=${AWS_S3_BUCKET}

jwt.secret=${JWT_KEY}

logging.level.root=INFO
logging.level.com.example.FixLog=DEBUG
logging.level.org.springframework.web.servlet.DispatcherServlet=DEBUG
logging.file.name=logs/app.log
###### [PROD] #####
#server.port=8083
#
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.url=${MYSQL_URL}
#spring.datasource.username=${MYSQL_USERNAME}
#spring.datasource.password=${MYSQL_PASSWORD}
#
#spring.jpa.hibernate.ddl-auto=update
#spring.jpa.show-sql=true
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
#spring.jpa.properties.hibernate.format_sql=true
#
#cloud.aws.credentials.access-key=${AWS_ACCESS_KEY_ID}
#cloud.aws.credentials.secret-key=${AWS_SECRET_ACCESS_KEY}
#cloud.aws.region.static=${AWS_REGION}
#cloud.aws.s3.bucket=${AWS_S3_BUCKET}
#
#jwt.secret=${JWT_KEY}
#
#logging.level.root=INFO
#logging.level.com.example.FixLog=DEBUG
#logging.level.org.springframework.web.servlet.DispatcherServlet=DEBUG
#logging.file.name=logs/app.log