Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

1. setting up a Spring Boot project is just File/New Project/Next/Next/Next, or download a starter project from https://start.spring.io

2. It's 2018, we don't use XML anymore, a Main class annotated with @SpringBootApplication is all the configuration you need (and autogenerated by step 1)

3. All you need to know about @Component before you get started is if you annotate a class with it, it will get instantiated with all its dependencies and made available for use in the container

4./5. Yes, to know about Filter, the filterChain and how to use it might take some minutes looking into the documentation or stack overflow, but that is what you are going to have to do anyway if you are going to use a framework.

I put knowing how to use @Component and figuring out what you need from the docs on the same level as knowing about the (req, res, next) pattern and knowing about async/callbacks/promises.

I agree that Java is verbose and has much ceremony but modern IDE's take away a lot of that pain. For my filter example the only things I typed are:

* the class name

* extends OPRF<tab>

* <alt><enter> <enter> to generate the 1 method to implement

* the `// your code` comment and filterChain.doFilter()

I'm not sure what you mean about choosing Runnable over lambdas. Runnable `is` a functional interface so anywhere you can use a Runnable, you can pass a lambda (or method reference)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: