8 ms·
#1 is a mostly Windows-related problem. You would've had similar issues with a Ruby- or JavaScript-based stack, probably much more so because Java generally is
by BjoernKW 7y ago
#1 is a mostly Windows-related problem. You would've had similar issues with a Ruby- or JavaScript-based stack, probably much more so because Java generally is quite decent in terms of platform-independence. With other environments you often have to deal with native binaries or compiling for your specific architecture, which can get messy if things don't work as expected during installation.
I agree that the magic behind autowiring different types of Spring Data repositories can be quite confusing.
The Spring Boot documentation in general is quite good, though. There are many how-tos and specific examples with working source code. Apart from Pivotal's (the company that's the main maintainer of Spring and Spring Boot) own resources, https://www.baeldung.com/ https://www.baeldung.com/ and https://www.mkyong.com/ https://www.mkyong.com/ are fantastic for learning about Spring and Spring Boot, too.
Concepts such as AOP or inversion of control aren't exclusive to Spring Boot (or Java, for that matter). It's useful to learn about them anyway and yes, if you don't know about those subjects before starting with Spring Boot you're in for quite a steep learning curve because you'll not only have to grasp the ins and outs and implementation details of a new framework but understand entirely new abstract concepts at the same time as well.
As for beans specifically, the definition of that term within the larger context of Java has varied a bit over time so there might be at least some ambiguity here, which can lead to understandable confusion. Traditionally, a bean in Java is a class which a.) is serialisable, b.) has a zero-argument constructor and c.) has getters and setters for modifying the internal state of its instances. Due to these properties beans lend themselves to storing and passing application state (for example in the larger context of a dependency injection environment).
With Spring and Spring Boot, 'bean' usually refers to the @Bean annotation that allows to have a method return an instance of a particular class, which will then be made available to other components of the application through Spring's dependency injection.
The @Bean annotation leaves the object instantiation and wiring to the user (see https://www.baeldung.com/spring-bean https://www.baeldung.com/spring-bean ) whereas other Spring annotations such as @Component or @Service (both are so-called stereotypes, with @Component being the more generic one that simply marks a class as 'managed by Spring' while @Service denotes that the component in question is to be used within the application's service layer. See https://www.baeldung.com/spring-component-repository-service https://www.baeldung.com/spring-component-repository-service) delegate wiring to Spring dependency injection.