Can we implement client side load balancing with Ribbon with Spring boot 2.5.2? - spring-cloud-netflix

we are trying to upgrade our code from spring boot 1.x to spring boot 2.5.2 and we were taking advantage of ribbon for client side load balancing with older version of spring boot (1.x).
Now, when I'm referring to the spring cloud netflix documentation, they are still referring to 'ribbon' for client side load balancing here
https://spring.io/projects/spring-cloud-netflix#overview.
But, some other place, spring documentation says, they dropped support for netflix ribbon in recent spring boot and i see the spring boot cloud starter is not pulling the ribbon dependencies when i switch to spring boot 2.5.2
Now, my question is, if i upgrade my Spring boot version from 1.x to 2.5.2 and add the netflix ribbon dependencies ( explicitly) can i still take advantage of ribbon for client side load balancing ?
All i'm trying to understand is, would spring boot 2.5.2 work with netflix ribbon (if i add the netflix ribbon dependencies by myself) ?

Spring Cloud Netflix Ribbon is no longer supported. We suggest using Spring Cloud LoadBalancer as a replacement. You can find the documentation here and a guide here. We suggest using start.spring.io to find out the versions of Spring Cloud compatible with the supported versions of Spring Boot.

Related

How to deploy Spring application on OpenShift?

I have a bunch of Spring applications (NOT Spring Boot!) that was developed for Karaf6 Fuse container. Now I have to deploy them on OpenShift.
If I open projects in RedHat Studio and install them via OpenShift explorer it fails.
I see the option to create new project for Karaf container but, this project is based on blueprint.xml in OSGI catalog. And my application has camel-context.xml in spring catalog. So i can't just copy project and deploy.
The only working solution a have for now is create new Spring Boot project and transfer functionality from old Spring application to new Spring Boot app. But it's too slow process.
Any ideas how to deploy Spring projects to OpenShift containers without porting process?

Configure MySQL with EFcore 3.0

I just started with Authentication and authorization for SPAs of Dotnet core 3.0 by using
dotnet new angular -o <output_directory_name> -au Individual
and it created a new project with Angular as a client side app and ASP.net core as a backend. Now I want to use MySQL with this template.
I have tried using two providers for this
MySql.Data.EntityFrameworkCore
Pomelo.EntityFrameworkCore.MySql
but both of them are not supported with Entityframework core 3.0 and asking me to downgrade to Entityframework core 2.2. When I downgraded to Entityframework core 2.2 another package named Microsoft.AspNetCore.ApiAuthorization.IdentityServer starts breaking as it requires Entityframework core version 3.0 and above.
Can somebody please tell me how to setup this template of Authentication and Authorization for SPAs for MySQL?
It turned out I had to wait some time for Pomelo Entity Framework Team to release the .NET Core 3.0 Supported version which is available now. All the other things are now working as expected.

enable reverse engieneer spring roo 2.0.0.M2

Hi I want to uso Spring roo, but how do I enable database instrospect sentence?
The documentation says that jpa in this roo version is a addon here but after invoke jpa setup --provider --database a springboot example is enable but no applicationContext.xml file is created, and thus I cannot enable reverse engieneer spring roo 2.0.0.M2.
after executing addon suite start --symbolicName org.springframework.roo.wrapping.mysql-connector-java
the database introspect is not enable and this appears Searching 'database introspect' on installed repositories
0 matches found with 'database introspect' on installed repositories
Spring Roo 2.0.0.M2 is the second milestone of Spring Roo 2.0 version. That means that it's not a final release and maybe some features that were available on previous Spring Roo versions could be not complete or could be unavailable on this one.
Here are the differences between the versions names:
GA = General availability (a release); should be very stable and feature complete
RC = Release candidate; probably feature complete and should be pretty stable - problems should be relatively rare and minor, but worth reporting to try to get them fixed for release.
M = Milestone build - probably not feature complete; should be vaguely stable (i.e. it's more than just a nightly snapshot) but may still have problems.
Ansewering your question about database reverse engineer, we are analyzing the posibility to migrate this Spring Roo 1.x feature to Spring Roo 2.x version to be able to use liquibase to mantain the generated model and the related DB using Spring Roo shell. So, maybe this functionality will be available on the next Spring Roo Milestone version or release candidate.
For now, if you want to use database reverse engineer you should try with Spring Roo 2.0.0.M1 (maybe applied changes for that version don't affect to reverse engineer) or with Spring Roo 1.3.2.RELEASE.
Check out the Spring Roo JIRA to know the Spring Roo roadmap. Feel free to report new issues.
Hope this helps.

OSGi and Hibernate - not suitable driver

I got the following situation.
I'm using Apache Felix as OSGi Service implementation and Apache Karaf as OSGi container.
There is a bundle in karaf which should save some data via hibernate into a database, but I always get a SQLException: No Suitable Driver found.
I deployed the mysql-connector-bundle to karaf.
The problem is, in my mind, that hibernate whether imports the mysql-driver-packages nor my classes which should be mapped.
But I don't know hot to fix this. I'm familar to eclipse rcp where the buddy-policy fixes such problems, is there any best practice for this problem for felix and karaf?
What version of hibernate do you use? Only since Hibernate 4, hibernate is aware of OSGi classloaders, and it still doesn't have complete OSGi support. See e.g. https://hibernate.onjira.com/browse/HHH-7527, which is planned for Hibernate 4.2.
We used Gemini JPA with eclipselink instead as JPA provider in OSGi.
In the karaf eco-system, there is Aries JPA, which is primarly used with OpenJPA. See Which JPA providers are supported by Apache Aries Managed JPA?
Hibernate can't access do data and classes from other bundles (at least in version 3.x; I don't know about version 4). It only works easily if all (methods using hibernate, pojos, mapping files, all libraries) is in the same bundle. It can't access resources in other bundles.
Please also see my answer in this thread.

Developing a Java web service using Jersey(JAX-RS), mySQL and Eclipse

I have successfully created Web Services from MySQL Database using Netbeans tutorial. However, I would like to develop similar web services using Eclipse IDE. Why Eclipse IDE? There are two reasons for that:
1) This is because i am using Tomcat 7.0 and JEE6. Unfortunately, NetBeans 7.0.1 implements Facade design pattern while using their “Create Web services from Database …” Wizard and it does not have a plugin for Tomcat 7 and EE6.
2) The NetBeans Wizard is helpful but does not help me understand details about using JDBC bridge, managing connections to MySQL DB and creating services to access the DB. Additionally, i want to add authorization for my services so that only registered users will be able to access my web services.
There's a very clear tutorial for building JAX-RS services in the Jersey user guide.
I found this tutorial that contains Restful web services using java and mysql in eclipse. It might be what you were looking for though it is a very simple tutorial. Check it out.
http://www.techpages.org/webservice/simple-restful-web-services-using-java-and-mysql-example/2009/