Skip to content

README: More info for adding framework to existing project #310

@katharinebrinker

Description

@katharinebrinker

I ran into some speed bumps while adding the user framework to an existing project (using the Quick Start guide in the README file). Hopefully this info helps future devs in similar situations.

Background deets

  • Java 21
  • Spring Boot 4.0.6
  • Spring User Framework 4.3.2
  • db: postgres; already connected + working
  • gradle
  • configured with application.properties

Dependency / config issues

I added the following dependencies:

// listed as required
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.retry:spring-retry'

// listed as additional for testing
testImplementation 'org.springframework.boot:spring-boot-data-jpa-test'
testImplementation 'org.springframework.boot:spring-boot-webmvc-test'
testImplementation 'org.springframework.boot:spring-boot-starter-security-test'

spring-retry does not work

spring-retry could not be found; that dependency needed to be commented out (compile-time error Could not find org.springframework.retry:spring-retry)

Needed additional OAUth2 dependency

Even though I'd included spring-boot-starter-security already, I needed to explicitly add an OAuth2 dependency (implementation org.springframework.boot:spring-boot-starter-oauth2-client)

Partial email config needed

Step 4 says that email configuration is optional but recommended; however, a JavaMailSender bean won't be configured (resulting in a runtime error) unless spring.mail.host is in application.properties (NOTE: I call out the application.properties part specifically, in case it behaves differently than an application.yml). The value can be blank (spring.mail.host=) and no other info (port / username / etc) is needed

For the Thymeleaf noobs (i.e., me and others like me)

Adding the user framework via gradle does not add the HTML templates to an existing project; though the guide says that default templates are provided, in my case I had to grab some from the demo app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions