Skip to main content

Command Palette

Search for a command to run...

Code Submission

For a university project report, you usually do not include the entire source code in the documentation. Instead, you include important code snippets and place the full source code in an appendix or separate submission.

Updated
1 min readView as Markdown

From your Spring Boot project root directory:

dir /s /b src\main\java*.java > files.txt

Then combine all Java files:

(for /f %f in (files.txt) do @echo ===== %f ===== && type "%f") > complete_source_code.txt

This creates:

complete_source_code.txt

Option 4: Generate Documentation Automatically

For professional-looking documentation:

Javadoc

mvn javadoc:javadoc

Generated documentation:

target/site/apidocs

This documents all classes, methods, and fields.

If you want the entire project code in a single text file, you can generate it automatically.

Run from your project root:

Get-ChildItem -Path .\src -Recurse -Include *.java,*.properties,*.yml,*.yaml |
ForEach-Object {
    "`n=================================================="
    "FILE: \((\)_.FullName)"
    "=================================================="
    Get-Content $_.FullName
} | Out-File project-code.txt

This will create:

project-code.txt