spring-boot-style-guide icon indicating copy to clipboard operation
spring-boot-style-guide copied to clipboard

Ideas

Open helpermethod opened this issue 6 years ago • 5 comments

  • Use Spring Initializr
  • Do not put business logic into your controllers
  • Use Spring Boot Actuator
  • Use JUnit5
  • ~~Use AssertJ~~
  • Use @Bean for object construction
  • Put @Beans into @Configuration classes
  • Use @Service for services
  • Use @Autowired in integration tests
  • @Services should be stateless.
  • Use Testcontainers. Do not use H2.
  • Use Hoverfly.

helpermethod avatar Feb 12 '19 07:02 helpermethod

Hi @helpermethod !

Thanks for sharing your knowledge through that repo. I believe it should be fed with more content in order to help others developers.

I would like to contribute to the project. Can I help you?

Thanks

gabriel-rcpereira avatar Aug 23 '21 13:08 gabriel-rcpereira

Hi @gabriel-rcpereira!

I've started this repo with the intention to make this the ultimate Spring Boot guide but got carried away by other things.

I sometimes think about revisiting this project because I think such a resource can provide a lot of value.

Contributions are welcome, if you have any ideas just raise a PR!

helpermethod avatar Aug 23 '21 18:08 helpermethod

Great! I'm able to move on following your list.

Thanks!

gabriel-rcpereira avatar Aug 25 '21 15:08 gabriel-rcpereira

Hi @helpermethod !

I opened a new PR when you have time take look at it, please.

In order to keep our list up to date:

  • Use Spring Initializr
  • ~Do not put business logic into your controllers~
  • Use Spring Boot Actuator
  • Use JUnit5
  • ~Use AssertJ~
  • Use @Bean for object construction
  • Put @Beans into @Configuration classes
  • Use @Service for services
  • Use @Autowired in integration tests
  • @Services should be stateless.
  • Use Testcontainers. Do not use H2.
  • Use Hoverfly.

Thanks in advance!

gabriel-rcpereira avatar Sep 03 '21 17:09 gabriel-rcpereira

Hi @gabriel-rcpereira, I hope to review your PR this weekend!

helpermethod avatar Sep 10 '21 13:09 helpermethod