Skip to content

Tag: spring

Factory pattern using generics

I would like to build a class that caches classes of type CachedObject using Map. Below is the factory class. I have a class that extends CacheableObject as below: When I try to create an instance of class X that extends CachedObject using the get method in the factory as below: (please note that cachedObject…

Java Spring and Existing HTML site

I have established connection between my Spring project and MySQL DB, I also have an existing HTML site with login and register templates. Can someone point me into the right direction on how to connect Spring with my existing HTML? Answer In order to implement login and register workflow you need to implemen…

Spring Boot and OAuth2 server

I’m trying to implement a simple OAuth2 server with Spring Boot. In the first step I added in the main class the annotation @EnableAuthorizationServer and I use the “application.yml” file to configure all the OAuth2 elements. With this configuration everything works fine. In the second step …