Skip to content

Patseroni/exercise8#229

Open
Patseroni wants to merge 5 commits intomainfrom
Patseroni/exercise8
Open

Patseroni/exercise8#229
Patseroni wants to merge 5 commits intomainfrom
Patseroni/exercise8

Conversation

@Patseroni
Copy link
Copy Markdown

@Patseroni Patseroni commented Dec 18, 2025

Summary by CodeRabbit

  • New Features

    • REST APIs to manage artists and songs; endpoints to list and create items
    • MySQL-backed runtime with Docker Compose support
    • HTTP Basic authentication required for API access
  • Tests

    • Added Spring Boot integration tests for API endpoints; removed legacy example tests
  • Chores

    • Migrated project to Spring Boot with updated build/dependency setup and app entrypoint

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 18, 2025

Walkthrough

Convert a simple Java app into a Spring Boot REST service: adds entities (Artist, Song), repositories, REST controllers, Spring Security, MySQL Docker Compose, application properties, tests, and replaces the old main with a Spring Boot entry point.

Changes

Cohort / File(s) Summary
Infrastructure & Build
docker-compose.yml, pom.xml
Added docker-compose.yml with a MySQL 9.4.0 service and credentials; replaced pom.xml with a Spring Boot parent POM, updated properties (java.version=25), swapped dependencies to Spring Boot starters (web, data-jpa, security, test), added mysql connector, and replaced plugins with spring-boot-maven-plugin.
Application Entry Point
src/main/java/org/example/Exercise2025Application.java, src/main/java/org/example/App.java (removed)
Removed legacy App.java; added Exercise2025Application annotated with @SpringBootApplication and a main method to launch Spring Boot.
Artist Domain
src/main/java/org/example/artist/Artist.java, src/main/java/org/example/artist/ArtistController.java, src/main/java/org/example/artist/ArtistRepository.java
Added JPA Artist entity (id, name), ArtistRepository (extends JpaRepository), and ArtistController exposing GET /api/artists and POST /api/artists (returns 201).
Song Domain
src/main/java/org/example/song/Song.java, src/main/java/org/example/song/SongController.java, src/main/java/org/example/song/SongRepository.java
Added JPA Song entity (id, title, many-to-one Artist), SongRepository (extends JpaRepository), and SongController exposing GET /api/songs and POST /api/songs which accepts artistId, looks up the Artist, assigns it, and saves the Song (404 if artist missing).
Security & Configuration
src/main/java/org/example/config/SecurityConfig.java, src/main/resources/application.properties, src/main/resources/application-dev.properties
Added SecurityConfig with SecurityFilterChain (CSRF disabled, /api/** requires auth, HTTP Basic enabled) and in-memory UserDetailsService (user/password); added application properties for MySQL datasource, Hibernate DDL auto-update, SQL logging, virtual threads, and docker-compose lifecycle management.
Tests
src/test/java/org/example/Exercise2025ApplicationTest.java, src/test/java/org/example/artist/ArtistControllerTest.java, src/test/java/org/example/AppIT.java (removed), src/test/java/org/example/AppTest.java (removed)
Removed legacy unit/integration tests; added Exercise2025ApplicationTest (@SpringBootTest context load) and ArtistControllerTest using MockMvc to assert unauthenticated 401 and authenticated 200 for /api/artists.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant SpringBootApp as App
    participant Security as Auth
    participant Controller
    participant Repo
    participant MySQL

    Client->>App: HTTP request (e.g., POST /api/songs)
    App->>Auth: Authenticate (HTTP Basic)
    Auth-->>App: 200 OK / 401 Unauthorized
    alt authenticated
        App->>Controller: invoke endpoint handler
        Controller->>Repo: find Artist by id
        Repo->>MySQL: SELECT artist
        MySQL-->>Repo: Artist row / empty
        alt artist found
            Controller->>Repo: save Song (with artist)
            Repo->>MySQL: INSERT song
            MySQL-->>Repo: insert OK
            Controller-->>Client: 201 Created (Song)
        else artist not found
            Controller-->>Client: 404 Not Found
        end
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Files to inspect closely:
    • pom.xml — dependency and plugin changes, Spring Boot version and Java 25 setting.
    • SecurityConfig.java — endpoint authorization rules and in-memory credentials.
    • JPA mappings (Song, Artist) — relationship annotations and cascade/lazy settings.
    • SongController.create — artist lookup, error handling, transaction boundaries.
    • application.properties and docker-compose.yml — datasource URL, credentials, and compose lifecycle settings.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Patseroni/exercise8

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 68121d2 and bb9c0f3.

📒 Files selected for processing (2)
  • pom.xml (1 hunks)
  • src/main/java/org/example/song/Song.java (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/org/example/song/Song.java
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: jennymakki
Repo: fungover/exercise2025 PR: 204
File: src/main/java/org/example/config/SecurityConfig.java:19-24
Timestamp: 2025-11-16T13:56:11.263Z
Learning: The repository fungover/exercise2025 is an exercise/learning project where hard-coded credentials and other shortcuts for ease of testing are acceptable and intentional.
📚 Learning: 2025-11-16T13:56:11.263Z
Learnt from: jennymakki
Repo: fungover/exercise2025 PR: 204
File: src/main/java/org/example/config/SecurityConfig.java:19-24
Timestamp: 2025-11-16T13:56:11.263Z
Learning: The repository fungover/exercise2025 is an exercise/learning project where hard-coded credentials and other shortcuts for ease of testing are acceptable and intentional.

Applied to files:

  • pom.xml
📚 Learning: 2025-11-21T16:16:54.793Z
Learnt from: LolloGro
Repo: fungover/exercise2025 PR: 211
File: src/main/resources/templates/listOfBooks.html:11-12
Timestamp: 2025-11-21T16:16:54.793Z
Learning: In the repository fungover/exercise2025, the Author DTO uses NotEmpty validation on firstName and lastName fields, and BookDto uses NotNull validation on the author field. This validation architecture ensures that books always have complete author information, making null-safety checks in Thymeleaf templates unnecessary.

Applied to files:

  • pom.xml
🔇 Additional comments (4)
pom.xml (4)

5-10: LGTM! Spring Boot 4.0.0 parent configuration is correct.

Spring Boot 4.0.0 requires at least Java 17 and is compatible with versions up to and including Java 25. The upgrade to Spring Boot 4.0.0 resolves the previous compatibility concern with Java 25.


30-30: Java 25 configuration is valid.

Spring Boot 4.0.0 provides first class support for Java 25 (whilst retaining Java 17 compatibility).


33-65: Dependencies are well-configured for a Spring Boot REST service.

The dependency set appropriately covers:

  • JPA/database integration (spring-boot-starter-data-jpa, mysql-connector-j)
  • REST API (spring-boot-starter-web)
  • Security (spring-boot-starter-security, spring-security-test)
  • Docker Compose support (spring-boot-docker-compose, optional for local development)
  • Testing (spring-boot-starter-test, spring-security-test)

All scopes (runtime, test, optional) are correctly applied.


70-77: Build configuration is correct.

The spring-boot-maven-plugin will use sensible defaults from the parent POM for packaging and running the Spring Boot application.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (5)
src/main/java/org/example/artist/Artist.java (1)

5-26: Entity structure looks good.

The JPA entity is correctly annotated and follows standard conventions. A couple of optional improvements for a production-ready entity:

  1. Consider adding @Column annotations with constraints (e.g., nullable = false) for the name field if it's required.
  2. For entities used in collections or with caching, implementing equals() and hashCode() based on the business key (e.g., name) is recommended.

Given this is an exercise project, these are optional enhancements.

src/main/java/config/SecurityConfig.java (1)

37-38: Remove trailing blank lines.

Minor: there are extra blank lines at the end of the file.

src/main/java/org/example/artist/ArtistController.java (1)

8-28: Clean REST controller implementation.

The controller follows Spring best practices with constructor injection and proper HTTP status codes. For enhanced robustness, consider adding @Valid annotation on the @RequestBody parameter along with validation constraints on the Artist entity, but this is optional for an exercise project.

pom.xml (2)

16-28: Consider removing empty metadata placeholders.

These empty tags (<url/>, <license/>, <developer/>, <scm> children) add clutter without providing value. Either populate them with actual project information or remove them entirely.

🔎 Apply this diff to remove empty placeholders:
     <name>exercise2025</name>
     <description>exercise2025</description>
-    <url/>
-    <licenses>
-        <license/>
-    </licenses>
-    <developers>
-        <developer/>
-    </developers>
-    <scm>
-        <connection/>
-        <developerConnection/>
-        <tag/>
-        <url/>
-    </scm>

66-77: Minor: Remove extra blank lines.

There are unnecessary blank lines before the closing </dependencies> tag and before <build>.

🔎 Apply this diff to clean up formatting:
         <scope>test</scope>
     </dependency>
-
-
     </dependencies>
-
     <build>
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8618163 and 54d5b69.

📒 Files selected for processing (17)
  • docker-compose.yml (1 hunks)
  • pom.xml (1 hunks)
  • src/main/java/config/SecurityConfig.java (1 hunks)
  • src/main/java/org/example/App.java (0 hunks)
  • src/main/java/org/example/Exercise2025Application.java (1 hunks)
  • src/main/java/org/example/artist/Artist.java (1 hunks)
  • src/main/java/org/example/artist/ArtistController.java (1 hunks)
  • src/main/java/org/example/artist/ArtistRepository.java (1 hunks)
  • src/main/java/org/example/song/Song.java (1 hunks)
  • src/main/java/org/example/song/SongController.java (1 hunks)
  • src/main/java/org/example/song/SongRepository.java (1 hunks)
  • src/main/resources/application-dev.properties (1 hunks)
  • src/main/resources/application.properties (1 hunks)
  • src/test/java/org/example/AppIT.java (0 hunks)
  • src/test/java/org/example/AppTest.java (0 hunks)
  • src/test/java/org/example/Exercise2025ApplicationTest.java (1 hunks)
  • src/test/java/org/example/artist/ArtistControllerTest.java (1 hunks)
💤 Files with no reviewable changes (3)
  • src/test/java/org/example/AppTest.java
  • src/test/java/org/example/AppIT.java
  • src/main/java/org/example/App.java
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: jennymakki
Repo: fungover/exercise2025 PR: 204
File: src/main/java/org/example/config/SecurityConfig.java:19-24
Timestamp: 2025-11-16T13:56:11.263Z
Learning: The repository fungover/exercise2025 is an exercise/learning project where hard-coded credentials and other shortcuts for ease of testing are acceptable and intentional.
📚 Learning: 2025-11-16T13:56:11.263Z
Learnt from: jennymakki
Repo: fungover/exercise2025 PR: 204
File: src/main/java/org/example/config/SecurityConfig.java:19-24
Timestamp: 2025-11-16T13:56:11.263Z
Learning: The repository fungover/exercise2025 is an exercise/learning project where hard-coded credentials and other shortcuts for ease of testing are acceptable and intentional.

Applied to files:

  • src/main/resources/application.properties
  • pom.xml
  • src/test/java/org/example/Exercise2025ApplicationTest.java
  • src/main/java/org/example/Exercise2025Application.java
📚 Learning: 2025-11-21T16:16:54.793Z
Learnt from: LolloGro
Repo: fungover/exercise2025 PR: 211
File: src/main/resources/templates/listOfBooks.html:11-12
Timestamp: 2025-11-21T16:16:54.793Z
Learning: In the repository fungover/exercise2025, the Author DTO uses NotEmpty validation on firstName and lastName fields, and BookDto uses NotNull validation on the author field. This validation architecture ensures that books always have complete author information, making null-safety checks in Thymeleaf templates unnecessary.

Applied to files:

  • pom.xml
📚 Learning: 2025-09-10T14:02:54.365Z
Learnt from: alfredbrannare
Repo: fungover/exercise2025 PR: 66
File: src/test/java/org/example/service/WarehouseTest.java:1-21
Timestamp: 2025-09-10T14:02:54.365Z
Learning: In the fungover/exercise2025 project, static mocking of LocalDateTime.now() works successfully with the existing Mockito setup without requiring mockito-inline dependency.

Applied to files:

  • src/test/java/org/example/Exercise2025ApplicationTest.java
🧬 Code graph analysis (4)
src/main/java/org/example/artist/ArtistController.java (1)
src/main/java/org/example/song/SongController.java (1)
  • RestController (10-39)
src/main/java/org/example/song/Song.java (1)
src/main/java/org/example/artist/Artist.java (1)
  • Entity (5-26)
src/main/java/org/example/song/SongController.java (1)
src/main/java/org/example/artist/ArtistController.java (1)
  • RestController (8-28)
src/main/java/org/example/artist/Artist.java (1)
src/main/java/org/example/song/Song.java (1)
  • Entity (6-32)
🔇 Additional comments (15)
src/main/resources/application-dev.properties (1)

1-1: LGTM! Appropriate dev profile configuration.

The start_only lifecycle management is a good choice for development, allowing the MySQL container to persist between application restarts without unnecessary stops/starts.

src/test/java/org/example/artist/ArtistControllerTest.java (1)

13-24: LGTM! Good test coverage for security.

The test class structure is appropriate, and the unauthenticated access test correctly verifies that endpoints are protected.

docker-compose.yml (2)

5-9: LGTM! Configuration appropriate for learning project.

The MySQL configuration with hard-coded credentials is acceptable for this exercise project. The credentials match those in application.properties, ensuring consistency.

Based on learnings, hard-coded credentials are intentional for this exercise repository.


3-3: Verify MySQL 9.4.0 suitability for production use.

MySQL 9.4.0 exists and the Docker image is available, but verify whether an Innovation Release is appropriate for your needs. Innovation releases receive frequent updates with limited support until the next release; consider whether MySQL 8.4 LTS or 9.5 (future LTS) would be more suitable for production stability. Additionally, monitor security advisories for 9.4.0 as known vulnerabilities affect this version.

src/test/java/org/example/Exercise2025ApplicationTest.java (1)

6-11: LGTM! Standard Spring Boot context loading test.

This is a standard smoke test that verifies the application context can load successfully. The empty test body is intentional - the test passes if the context loads without exceptions.

src/main/java/org/example/artist/ArtistRepository.java (1)

5-6: LGTM! Standard Spring Data JPA repository.

The repository interface is correctly implemented, extending JpaRepository to provide standard CRUD operations for the Artist entity.

src/main/java/org/example/Exercise2025Application.java (1)

6-11: LGTM! Standard Spring Boot application entry point.

The application class is correctly implemented with the standard Spring Boot bootstrap pattern.

src/main/resources/application.properties (3)

3-6: LGTM! Datasource configuration matches Docker Compose.

The MySQL datasource configuration correctly matches the credentials and database name defined in docker-compose.yml.


8-9: JPA configuration appropriate for learning project.

Using ddl-auto=update and show-sql=true are good choices for a learning environment. Note that ddl-auto=update should not be used in production as it can lead to data loss or schema corruption.


11-11: LGTM! Virtual threads enabled for improved performance.

Enabling virtual threads is a good choice for Spring Boot 3.x applications, providing better scalability for blocking I/O operations.

src/main/java/org/example/song/SongRepository.java (1)

5-6: LGTM! Standard Spring Data JPA repository.

The repository interface is correctly implemented, extending JpaRepository to provide standard CRUD operations for the Song entity.

src/main/java/config/SecurityConfig.java (1)

14-25: Security configuration logic is appropriate for this exercise project.

The filter chain correctly:

  • Disables CSRF (acceptable for stateless API with HTTP Basic)
  • Requires authentication for /api/** endpoints
  • Permits all other requests
  • Uses HTTP Basic authentication

Based on learnings, hard-coded credentials are acceptable for this exercise/learning project.

src/main/java/org/example/song/SongController.java (1)

10-25: Controller structure follows good practices.

Constructor injection, proper use of @RestController, @RequestMapping, and consistent endpoint design matching ArtistController.

pom.xml (2)

32-65: LGTM!

The dependency configuration is well-structured with appropriate scopes:

  • JPA, Web, and Security starters for core functionality
  • MySQL connector correctly scoped as runtime
  • Docker Compose support as optional for local development
  • Test dependencies properly scoped

5-10: No action required. Spring Boot 3.5.6 is available in Maven Central and is a valid, established release.

Comment thread pom.xml
@@ -0,0 +1,38 @@
package config;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the package structure and main application location
echo "=== Main Application Location ==="
fd -e java -x grep -l "SpringApplication.run" {}

echo ""
echo "=== SecurityConfig Location ==="
fd SecurityConfig.java

echo ""
echo "=== Check for @ComponentScan annotation ==="
fd -e java -x grep -l "@ComponentScan\|@SpringBootApplication" {} | xargs grep -A2 "@ComponentScan\|@SpringBootApplication" 2>/dev/null

Repository: fungover/exercise2025

Length of output: 337


Critical: SecurityConfig package structure prevents Spring component detection.

The class is in the config package at the root level, but the main application class (Exercise2025Application) is in org.example. Spring Boot's component scanning only scans sub-packages of the main class by default, so this configuration will not be picked up, and security settings won't be applied.

Move this class to org.example.config:

-package config;
+package org.example.config;
📝 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
package config;
package org.example.config;
🤖 Prompt for AI Agents
In src/main/java/config/SecurityConfig.java (line 1), the class is declared in
the top-level package `config` so Spring Boot (main class in org.example) won't
component-scan it; move the file to
src/main/java/org/example/config/SecurityConfig.java and change its package
declaration to `package org.example.config;`, update any import/references if
necessary, and rebuild so Spring can detect and apply the security
configuration.

Comment on lines +10 to +18
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

private String title;

@ManyToOne
@JoinColumn(name = "artist_id")
private Artist artist;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Missing getId() and getArtist() getters.

The entity lacks getters for id and artist. When SongController.getAll() returns a list of songs, the JSON response won't include these fields, making the API response incomplete. The Artist entity correctly provides getId(), so this should be consistent.

🔎 Add the missing getters:
     private Artist artist;
 
+    public Long getId() {
+        return id;
+    }
+
     public String getTitle(){
         return title;
     }
+
+    public Artist getArtist() {
+        return artist;
+    }
🤖 Prompt for AI Agents
In src/main/java/org/example/song/Song.java around lines 10 to 18, the Song
entity is missing public getters for id and artist so those fields are not
serialized in API responses; add public Long getId() { return this.id; } and
public Artist getArtist() { return this.artist; } to the class (place them
alongside the existing getters) so JSON serialization and callers can access
these properties.

Comment thread src/main/java/org/example/song/SongController.java Outdated
Comment thread src/test/java/org/example/artist/ArtistControllerTest.java
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/main/java/org/example/song/SongController.java (1)

28-39: Great fix! The previous issue with error handling has been addressed.

The POST endpoint now properly throws a 404 Not Found when the artist doesn't exist, resolving the concern from the previous review.

Consider adding @Valid annotation to the @RequestBody Song song parameter to enable automatic validation if the Song entity has validation constraints (e.g., @NotNull, @Size).

💡 Optional enhancement for request validation
+import jakarta.validation.Valid;
+
 ...
 
     public Song create(
             @RequestParam Long artistId,
-            @RequestBody Song song
+            @RequestBody @Valid Song song
     ) {
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 54d5b69 and 783baa2.

📒 Files selected for processing (3)
  • src/main/java/org/example/song/Song.java (1 hunks)
  • src/main/java/org/example/song/SongController.java (1 hunks)
  • src/test/java/org/example/artist/ArtistControllerTest.java (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/main/java/org/example/song/Song.java
  • src/test/java/org/example/artist/ArtistControllerTest.java
🧰 Additional context used
🧬 Code graph analysis (1)
src/main/java/org/example/song/SongController.java (1)
src/main/java/org/example/artist/ArtistController.java (1)
  • RestController (8-28)
🔇 Additional comments (2)
src/main/java/org/example/song/SongController.java (2)

11-21: LGTM! Clean controller setup with proper dependency injection.

The controller follows Spring Boot best practices with constructor injection and final fields, consistent with the pattern used in ArtistController.


23-26: LGTM! Standard GET endpoint implementation.

The getAll endpoint follows the same pattern as ArtistController, providing a consistent API design.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/main/java/org/example/config/SecurityConfig.java (1)

9-9: Consider using specific imports instead of wildcard.

Line 9 uses a wildcard import. For better clarity, consider importing only the specific classes used (User and UserDetails).

🔎 Proposed refactor
-import org.springframework.security.core.userdetails.*;
+import org.springframework.security.core.userdetails.User;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 783baa2 and 68121d2.

📒 Files selected for processing (1)
  • src/main/java/org/example/config/SecurityConfig.java (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: jennymakki
Repo: fungover/exercise2025 PR: 204
File: src/main/java/org/example/config/SecurityConfig.java:19-24
Timestamp: 2025-11-16T13:56:11.263Z
Learning: The repository fungover/exercise2025 is an exercise/learning project where hard-coded credentials and other shortcuts for ease of testing are acceptable and intentional.
🔇 Additional comments (2)
src/main/java/org/example/config/SecurityConfig.java (2)

17-20: Verify the security configuration aligns with your requirements.

The configuration disables CSRF and permits all non-API requests. This is a common pattern for REST APIs, but please confirm:

  • CSRF disabled: Appropriate for stateless APIs but consider if your application has any state-changing endpoints that might be vulnerable to CSRF attacks when using HTTP Basic authentication.
  • permitAll() for non-API endpoints: All endpoints outside /api/** are publicly accessible. Verify this is intentional (e.g., for static resources, health checks, etc.).

27-35: In-memory authentication configuration looks good for this exercise project.

The hard-coded credentials and {noop} password encoder are appropriate for this learning/exercise project. Based on learnings, this approach is intentional for ease of testing.

Note: For production applications, you would want to:

  • Use encrypted passwords (e.g., BCrypt)
  • Store credentials externally (database, LDAP, OAuth2)
  • Implement proper secret management

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants