How to discover which spring jar includes a spring package and class? - spring

I am upgrading the libraries on a system and am implementing spring boot. But, there are some dependencies that have to be added over and above the spring boot starters, and some of these are Spring classes.
How can I tell which library a package and class is coming from? The documentation for the class does not seem to provide this...

If i'm understanding correctly, what i do is looking for Compile Dependencies in the maven repos.

Related

Does Spring have similar open source package like PHP?

I am new to Spring and learning spring boot and I have used maven for dependency manager and have built a crud application and now I am looking to explore it more. I am wondering if spring has open source package website which list them like how we have https://packagist.org for php packages.
I am using mvnrepository. It has dependencies for maven, gradle, ivy and some others.

Why are there no Java classes in Spring Boot starters JARs?

On springboot 2.0 I want to know why spring authorities do this?
spring-boot-starter-jdbc-2.0.0.jar why not content????
This is done on purpose.
The code for the auto-configuration is contained in the spring-boot module; Spring Boot starters are "just" POMs bringing all the dependencies that will trigger the auto-configuration for that use case.
Third party starters (i.e. maintained by the community) can ship auto-configuration code as well.
You can learn more about how to create your own starter and why they're structured like this in the reference documentation.

How to tell Spring manage autowired dependencies in my library?

I have a reusable component that right now uses Spring in order to be properly instantiated, that means that Spring will autowire all the dependencies that my component needs. I want to make this component a maven module and import it to other projects. All the projects that will use this library are using Spring as Dependency Injector. Can Spring still manage the dependencies for my maven module or do I need to do that manually.Are there any best practices for such scenarios? What I basically asking is how to tell spring to manage the dependencies of my library.

Spring Boot support maven multi-module

I am trying to convert my existing multi-module maven Spring project to Spring Boot project. The reason is make it self contain and follow Martain Fowler's microservices concept.
However, the problem I have encounter is when try to clean build, seems the spring boot is trying to find the Main method from every module, which of course will failed.
Is this feature currently supported by Spring Boot 1.1.6.RELEASE or I did something wrong?
Thanks
It sounds like you've added Spring Boot's Maven plugin to every module in your build – it's what's looking for a main method. You should only add the Spring Boot plugin to a module if its a service that you want to run. If the module's just code that's shared between your services, the Spring Boot plugin isn't needed in that module.

Spring Security 3.1.3 #EnableWebSecurity

I'm having trouble finding which package contains #EnableWebSecurity in Spring Security 3.1.3. I've added core, config, web and ldap security packages, but the annotation remains unavailable. Has it been replaced by another annotation?
I think java config support is not yet released with Spring Security, but available as a separate module in spring-security-javaconfig. See instructions in the linked page about how to include the jar into your maven build.
I faced the same problem and was able to solve it by adding "spring-boot-starter-security" as a dependency in build.gradle as mentioned in the spring "Getting Started" guide available #
https://spring.io/guides/gs/securing-web/

Resources