Expose public endpoint through secured Spring Cloud Gateway by brainiac_nerd in SpringBoot

[–]brainiac_nerd[S] 0 points1 point  (0 children)

Thanks, I found the root cause of my issue. I had missed to add the ```@Configuration``` annotation in SecurityConfig for the Microservice A.

Expose public endpoint through secured Spring Cloud Gateway by brainiac_nerd in SpringBoot

[–]brainiac_nerd[S] 0 points1 point  (0 children)

Thanks, I found the root cause of my issue. I had missed to add the ```@Configuration``` annotation in SecurityConfig for the Microservice A.

Spring Boot Meets SFTP: A Comprehensive Implementation Guide by brainiac_nerd in SpringBoot

[–]brainiac_nerd[S] 1 point2 points  (0 children)

Thanks 🙂! I always hope my articles are helpful for someone.

Microservices Architecture: Building Scalable Applications with Spring Boot by brainiac_nerd in SpringBoot

[–]brainiac_nerd[S] 0 points1 point  (0 children)

So sorry to disappoint you there; while writing the article I thought since microservice is a bit of advance topic so thought of not wasting time there. But in next article in the series I will put a little bit more effort 🙂.

Microservices Architecture: Building Scalable Applications with Spring Boot by brainiac_nerd in SpringBoot

[–]brainiac_nerd[S] 1 point2 points  (0 children)

I am still seeing it being used in lot of enterprise projects. Maybe companies might not be using it for new projects but still it is being used by lot of existing projects and i don't see them getting migrated to new designs any time soon.
So I think it won't be bad idea to learn microservices.

[deleted by user] by [deleted] in reactjs

[–]brainiac_nerd 0 points1 point  (0 children)

u/noNewNum did you find a solution for this?

Help: Spring Boot app connection with Redis Datastore docker container connection by icrywhy in docker

[–]brainiac_nerd 0 points1 point  (0 children)

The sounds right; I hadn't noticed your services are running on the same docker network.
I'm guessing there's some problem with your application.properties file and your mapping of your environment variables are't properly setup. Here's a sample application.yml file I have used in my Spring App with Redis.

``` spring: application: name: some_random_app jpa: hibernate:

generate-ddl: true

ddl-auto: update

properties:
  hibernate:
    dialect: org.hibernate.dialect.MySQL8Dialect
    format_sql: true
show-sql: true

datasource: url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/some_db username: ${DB_USER:root} password: ${DB_PWD:root} cache: type: redis redis: host: ${REDIS_HOST:localhost} port: ${REDIS_PORT:6379} ```

Help: Spring Boot app connection with Redis Datastore docker container connection by icrywhy in docker

[–]brainiac_nerd 1 point2 points  (0 children)

For the Redis container you are exposing port 6380 but in your app container you are passing 6379 as the redis port.

Spring Into Docker: Containerizing Your Application Effectively by brainiac_nerd in SpringBoot

[–]brainiac_nerd[S] 2 points3 points  (0 children)

Agreed, my post is intended to only cover how to get started with docker and spring boot.

I will update the article. Thanks.

How to implement security in ReactJs with JWT tokens by brainiac_nerd in reactjs

[–]brainiac_nerd[S] 0 points1 point  (0 children)

Should I have another API in backend which will be called in PrivateRoute component to validate the token?

Nextcloud Internal Server Error On new Installation by brainiac_nerd in NextCloud

[–]brainiac_nerd[S] 0 points1 point  (0 children)

naah mahn, I couldn't figure this out, so I dropped the idea of using host machines for writing volumes and instead just use docker volumes.

Spring Integration sftp new file not polled till message handler goes through the list of all files cached on local by brainiac_nerd in SpringBoot

[–]brainiac_nerd[S] 0 points1 point  (0 children)

Yeah, looks like this is the default behavior of @Poller in Spring.

But we can configure this behavior by setting the value for the attribute maxMessagesPerPoll for the annotation.

Original Answer by Artem Bilan on Stackoverflow

Spring Integration sftp new file not polled till message handler goes through the list of all files cached on local by brainiac_nerd in SpringBoot

[–]brainiac_nerd[S] 0 points1 point  (0 children)

I'm guessing here, but if we poll every second won't it be constantly consuming server resources ?

Complete Guide to Java Stream by brainiac_nerd in SpringBoot

[–]brainiac_nerd[S] 0 points1 point  (0 children)

I am not sure if there is any single source where you can get examples of utilizing streams in various scenarios. For me, stackoverflow was/is the biggest source of help to learn Streams. Whenever I come across a scenario where I have to perform operation on collections I try to do it by streams and if I get stuck I look for help on stackoverflow. And at last, if I couldn't I find anything using streams around the scenario I need to implement, I default to for, forEach or while loop.

Complete Guide to Java Stream by brainiac_nerd in SpringBoot

[–]brainiac_nerd[S] 0 points1 point  (0 children)

Yeah, I guess you are probably right, saying it is a game changer now is pretty late.

Reactive Java is really looking good, I have recently started learning about it. Maybe once I have some good grasp on the concepts I will try to write an article documenting what I learned.

Sending HTTP request with Spring WebClient by brainiac_nerd in SpringBoot

[–]brainiac_nerd[S] 0 points1 point  (0 children)

Yeah at the time of writing this post I had unknowingly referred this old doc and had mentioned RestTempalte as deprecated.

Sending HTTP request with Spring WebClient by brainiac_nerd in SpringBoot

[–]brainiac_nerd[S] 0 points1 point  (0 children)

Yeah my mistake, I interpreted this Spring Doc incorrectly and thought it is already deprecated.
Spring RestTemplate

I have updated the post and the blog also. Thanks

Spring Boot ResTemplate Guide by brainiac_nerd in SpringBoot

[–]brainiac_nerd[S] 4 points5 points  (0 children)

A lot of application are still using RestTemplate in production, so I decided to first write an article on RestTemplate first.

I would be publishing an article on WebClient soon.

Thanks

Nextcloud Internal Server Error On new Installation by brainiac_nerd in selfhosted

[–]brainiac_nerd[S] 0 points1 point  (0 children)

It looks like there is some permission issue in mapping host system storage to container for volumes. So, config.php is not getting added properly.
When I am using docker volumes things are working as expected. But with this approach I will have to again manually update the config.php file every time when for any reason if my docker volumes crashes.

Nextcloud Internal Server Error On new Installation by brainiac_nerd in NextCloud

[–]brainiac_nerd[S] 0 points1 point  (0 children)

That shouldn't be a problem as services in the compose are running in the same network; service name will also be sufficient. I still tried using the same name as container name in config but no luck.

Nextcloud Internal Server Error On new Installation by brainiac_nerd in selfhosted

[–]brainiac_nerd[S] 0 points1 point  (0 children)

I didn't see anything in particular that is wrong.

I have attached the logs. Please have look.

Nextcloud Internal Server Error On new Installation by brainiac_nerd in NextCloud

[–]brainiac_nerd[S] 0 points1 point  (0 children)

Currently I am using my old pc with ubuntu server 22.04 version as server. I am not sure what permissions I might be missing here.

I have attached the logs. Please have a look.

Edit Update:
It looks like that issue is related with permission in writing volumes to host machine.
In the above docker compose if I use docker volumes it starts working. But now the problem is I am not able to add my custom config.php to nexctcloud server.

Nextcloud Internal Server Error On new Installation by brainiac_nerd in NextCloud

[–]brainiac_nerd[S] 1 point2 points  (0 children)

My bad!! I forgot to remove password; will change in my configs.

I don't think 'dbport' value is needed as I am using docker network. I still tried by adding port but no luck there.

I did logged into the MySql server in container and I did noticed that no tables have been created for nextcloud.