Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
application.properties
application-test.properties
.idea
*.iws
*.iml
Expand All @@ -37,3 +35,4 @@ out/

### VS Code ###
.vscode/
/.env
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public class Diary {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id; // 다이어리 ID

@Column(columnDefinition = "NVARCHAR(255)")
private String title; // 제목

@Lob
Expand Down
44 changes: 44 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
spring.security.oauth2.client.registration.google.client-id=${GOOGLE_CLIENT_ID}
spring.security.oauth2.client.registration.google.client-secret=${GOOGLE_CLIENT_SECRET}
spring.security.oauth2.client.registration.google.redirect-uri=${GOOGLE_REDIRECT_URI}
spring.security.oauth2.client.registration.google.scope=email, profile

spring.datasource.url=${SPRING_DATASOURCE_URL}
spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
spring.datasource.password=${DB_PASSWORD}

spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
spring.jpa.properties.hibernate.connection.charSet=UTF-8
spring.jpa.properties.hibernate.connection.useUnicode=true
spring.jpa.properties.hibernate.connection.characterEncoding=UTF-8

jwt.secret-key=${JWT_SECRET_KEY}
jwt.access-token-expiration-minutes=30
jwt.refresh-token-expiration-minutes=1440
jwt.header=Authorization
jwt.prefix=Bearer

spring.redis.host = localhost
spring.redis.port = 6379
spring.redis.password=${REDIS_PASSWORD}
spring.redis.timeout = 6000

Comment on lines +23 to +27
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Whitespace breaks property keys & hard-coded local Redis host.

Trailing spaces before = become part of the key, so Spring will fail to bind.
Also, hard-coding localhost defeats containerised / cloud deploys; prefer an env placeholder.

- spring.redis.host = localhost
- spring.redis.port = 6379
- spring.redis.password=${REDIS_PASSWORD}
- spring.redis.timeout = 6000
+spring.redis.host=${REDIS_HOST:localhost}
+spring.redis.port=${REDIS_PORT:6379}
+spring.redis.password=${REDIS_PASSWORD}
+spring.redis.timeout=${REDIS_TIMEOUT:6000}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
spring.redis.host = localhost
spring.redis.port = 6379
spring.redis.password=${REDIS_PASSWORD}
spring.redis.timeout = 6000
spring.redis.host=${REDIS_HOST:localhost}
spring.redis.port=${REDIS_PORT:6379}
spring.redis.password=${REDIS_PASSWORD}
spring.redis.timeout=${REDIS_TIMEOUT:6000}
🤖 Prompt for AI Agents
In src/main/resources/application.properties around lines 23 to 27, remove any
trailing spaces before the '=' in the Redis property keys to ensure Spring can
bind them correctly. Replace the hard-coded 'localhost' value for
spring.redis.host with an environment variable placeholder like ${REDIS_HOST} to
support containerized and cloud deployments.

spring.mail.host = smtp.gmail.com
spring.mail.port = 587
spring.mail.username=${MAIL_USERNAME}
spring.mail.password=${MAIL_PASSWORD}
spring.mail.properties.mail.smtp.auth = true
spring.mail.properties.mail.smtp.starttls.enable = true
spring.mail.properties.mail.smtp.ssl.trust=smtp.gmail.com

spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html
spring.thymeleaf.mode=HTML
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.cache=false

cloudinary.cloud-name=dr6jccdxm
cloudinary.api-key=${CLOUDINARY_API_KEY}
cloudinary.api-secret=${CLOUDINARY_API_SECRET}
Loading