Class ExamplesController
java.lang.Object
io.queryanalyzer.example.controller.ExamplesController
-
Constructor Summary
ConstructorsConstructorDescriptionExamplesController(UserRepository userRepository, OrderRepository orderRepository, org.springframework.jdbc.core.JdbcTemplate jdbcTemplate) -
Method Summary
Modifier and TypeMethodDescriptionCombines multiple anti-patterns to trigger multiple issues: - N+1 query pattern (orders) - Slow query (via SLEEP)org.springframework.http.ResponseEntity<String>
-
Constructor Details
-
ExamplesController
public ExamplesController(UserRepository userRepository, OrderRepository orderRepository, org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
-
-
Method Details
-
nPlusOneBad
-
nPlusOneGood
-
multipleNPlusOne
-
slowQuery
-
queryInLoop
-
queryInLoopFixed
-
parameterizedQuery
-
everythingWrong
@GetMapping("/bad/everything-wrong") @Transactional(readOnly=true) public org.springframework.http.ResponseEntity<List<Map<String,Object>>> everythingWrong()Combines multiple anti-patterns to trigger multiple issues: - N+1 query pattern (orders) - Slow query (via SLEEP) -
bestPractices
-
testRateLimit
@GetMapping("/test/rate-limit") @Transactional(readOnly=true) public org.springframework.http.ResponseEntity<String> testRateLimit()
-