{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":675430742,"defaultBranch":"main","name":"LibraryMgr.kt","ownerLogin":"vendethiel","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2023-08-06T22:17:23.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/199499?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1691360928.0","currentOid":""},"activityList":{"items":[{"before":"b0ecc5321f11b574ea5e314136251e8cd0135e9d","after":"f8b5ec8936832fcfd53a68da66f6716d4131938c","ref":"refs/heads/main","pushedAt":"2023-08-23T14:29:10.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"vendethiel","name":"ven","path":"/vendethiel","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/199499?s=80&v=4"},"commit":{"message":"author controller tests\n\nBump gradle because we're on java 20... just for my machine. Otherwise we're in java 17 compat mode.\n\nIgnore accept header to be able to get JSON responses in the browser without ?mediaType","shortMessageHtmlLink":"author controller tests"}},{"before":null,"after":"b0ecc5321f11b574ea5e314136251e8cd0135e9d","ref":"refs/heads/main","pushedAt":"2023-08-06T22:28:48.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"vendethiel","name":"ven","path":"/vendethiel","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/199499?s=80&v=4"},"commit":{"message":"Basic LibraryManager impl\n\nThis only has static books and authors for now, only as a Spring\nBoot+MVC PoC.\n\nUses Thymeleaf templates which need to be de-duplicated.\n\nGeneral notes:\n- Make sure not to create a .java file in your src/kotlin/ directory.\nYou'll lose a lot of time trying to understand why your class isn't\npicked up...\n(Apparently it's fine if you have .kt files in your\nsrc/java/ directory, unsure about that).\n- H2 is pretty cool, unsure about its feature matrix\n(of course, nothing is as good as Pg).\n- Kotlin Gradle build file necessitated a small fix (namely `snippetsDir`), but worked fine\n otherwise.\n- I disabled spring-security mistakenly, I need to take a look later.\n- spring-session will prevent you from accesssing your app by default.\nIt's probably something I want in the long run, but for earlier tests\ndefinitely not:\nIt meant trying to access the API would always give me a login page.\n- I enabled Reactor just because I love Kool-Aid, but I have no plans to\n use/no clue how to use it yet.\n- Same for GraphQL (though I know more about GraphQL).\n\nSpring-specific notes:\n- The framework considers file extensions are a thing from the past.\nBasically, I have to use `?mediaType=json` in my URL because it deems\n`.json` to be from a bygone era that should be purged.\nI disagree (heavily).\n- ^ Slightly related, it doesn't seem like there's a way to mimic Rails'\n `respond_with`.\nSo if I want to respond to HTML and JSON, I need to write my code twice.\nI suspect this means at some point I'll stop using the JPA interfaces\n(or rather, their magically autogenerated implementations) and wrap them\nup in a service, so both the controller actions (one HTML one JSON) can\ncall the same code.\n- Controller \"Advice\" is... an interesting name for an error handler.\nI suppose it can do more than that too, but all I've found on\nControllerAdvice was related to error handling.\nAlso, I can probably clear up my `@Order` annotations now.\n- Make sure to use `JsonIgnoreProperties` for bidirectional properties.\nOtherwise your JSON serializer will curse you.\nThis is the best of all other solutions\n(like JsonBackReference which would mean on one side, the relationship is serialized, on the other side it's not. Or having to write your own serializer entirely...).\n- `EntityGraph`s are your friend. If you don't use them, and you try to\n eager load (to avoid n+1 queries) with `@Query(...join fetch...)`, you'll StackOverflow.\nSetting the `@ManyToMany` itself to load `EAGER`ly also seems\ndiscouraged, and might've been the cause of a few bugs I hit (also\nrelated to `StackOverflow`... maybe), but after fixing it all I'm not\nactually sure which part produced these exceptions.\n\nAll in all... Spring Boot's honestly not that bad. Lots of head banging\nagainst the wall, but part of it was also my fault (and to be fair, no\nORM does HABTM/Many-to-Many properly anyways).","shortMessageHtmlLink":"Basic LibraryManager impl"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAADcOEqHwA","startCursor":null,"endCursor":null}},"title":"Activity ยท vendethiel/LibraryMgr.kt"}