Quantcast
Channel: Using static final Strings for SQL Query in Spring Boot - Code Review Stack Exchange
Browsing all 4 articles
Browse latest View live

Answer by Brandon LS for Using static final Strings for SQL Query in Spring Boot

I agree with @mtj's answer : YAGNI, no point in making the string reusable if it's not being reused at the moment.I would want to add that in certain scenarios it may be smart to factor out only part...

View Article



Answer by mtj for Using static final Strings for SQL Query in Spring Boot

Sorry to present the antithesis to an existing answer once more: if the string is neither reusable nor public, a constant makes no sense in my book. (And yes, this question is opinion-based ;-))I see...

View Article

Answer by K.H. for Using static final Strings for SQL Query in Spring Boot

Not many valid reasons, why would ever isRecordExists2 be better method. It is almost always good to extract reusable strings into constants and split code into smaller pieces. I definitely vote for...

View Article

Using static final Strings for SQL Query in Spring Boot

This is regarding code quality and coding standards with respect to Spring Ecosystem. Here there are two methods:isRecordExists is using a class level static constant String query. (Definitely...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images