Giter Club home page Giter Club logo

javadevjournal's Issues

jdbcUrl Issue you mentioned in a note at the end of your article - simple way to fix it is to rename "url" to "jdbc-url"

Hi and thank you for great article. The note at the bottom about Hikari switch in Springboot 2.0, all I had to do is rename

spring.datasource.url=....

to:

spring.datasource.jdbc-url=....

Given that it is such a simple change, I think it would significantly improve your article if you add that solution instead of having the comment with a url to another site. The url document does have that information as well; however, it is little bit hidden:

image

Just a suggestion, much appreciated for the article.

I dont see multiple Authentication Providers implementation?

In the article https://www.javadevjournal.com/spring-security/spring-security-multiple-authentication-providers/, I would except to see an implementeation showing how multiple auth providers can be added to an app. For example:

  1. LDAP auth provider
  2. Oath auth provider
  3. LoginForm auth provider
  4. DB auth provider
  5. ...

, however, all I see is article talking about multiple auth providers but using a single user based auth provider (DB). It does not show at all nor provide example where we have multiple authentication providers. It provides a single CustomAuthenticationProvider using UserDetailsService to get user details from database.
Same thing is with the provided code on this github

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[2021-06-09 18:03:28.688] - 428
Serious [main] --- org.springframework.boot.SpringApplication: Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:157)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
at com.javadevjournal.SpringBootCustomMessageSourceApplication.main(SpringBootCustomMessageSourceApplication.java:21)
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(ServletWebServerApplicationContext.java:206)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:154)
... 8 more

Jedis Connection Failure when Using Spring Boot Admin Starter Client Dependency

When including the de.codecentric:spring-boot-admin-starter-client dependency in my Spring Boot application, I encounter issues with connecting to Jedis, resulting in connection failures. However, upon removing this dependency, the Jedis connection functions as expected.

Expected Behavior:
The inclusion of the spring-boot-admin-starter-client dependency should not interfere with the ability to establish connections to Jedis servers within the Spring Boot application.

Actual Behavior:
Adding the spring-boot-admin-starter-client dependency leads to Jedis connection failures or errors, hindering the normal operation of the Spring Boot application.

Additional Information:

Version of spring-boot-admin-starter-client being used: 3.2.1
Version of Jedis client being used:

redis.clients jedis org.springframework.boot spring-boot-starter-data-redis io.lettuce lettuce-core

Unable to send SimpleMailMessage

Dear Author,

I use spring-boot-starter-mail and implement EmailService in the similar way (I just add error type, which can be throwed by the sendSimpleEmail method)
Service is being called from the RestController:
@GetMapping("/email") public @ResponseBody Object email() { try { mailer.sendSimpleEmail("[email protected]", "Test Subject", "Test message"); // <-- hangs up here return ResponseEntity.ok(new GenericResponse("OK")); } catch (Exception ex) { return ResponseEntity.badRequest().body(new GenericResponse(ex.getMessage())); } }
When the endpoint is called by Postman, it hangs up and returns nothing

spring-config.xml - DefaultCodeVerifier

Hi,
I define bean in spring-config.xml in order to have it istantiated once use method verifyTotp. Here the definition inside the xml:

<bean id="codeVerifier" class="dev.samstevens.totp.code.DefaultCodeVerifier" />

On the server startup I receive error in the logs:

org.springframework.beans.BeanInstantiationException: Failed to instantiate [dev.samstevens.totp.code.DefaultCodeVerifier]: No default constructor found; nested exception is java.lang.NoSuchMethodException: dev.samstevens.totp.code.DefaultCodeVerifier.()

Which workaround/method you suggest to follow?

Thanks in advance for answers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.