Skip to content

HungUnicorn/spring-security-registration

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generate translations by Spring AI for Login and Registration Example Project with Spring Security

This project takes the application provided by Baeldung and can generate the translated messages displaying to the users. So this application can serve the users other than the English users.

There are 99 messages stored in messages_en.properties for the Thymeleaf frontend to display to the users. Running TranslationApplication class in com.baeldung.translation folder can generate the translations.

Environment variables

  • HTTP_ACCEPT_LANGUAGE=
  • SPRING_AI_OPENAI_API-KEY=

HTTP_ACCEPT_LANGUAGE accepts a string, and the prompt decides the best fitted language. For example, setting HTTP_ACCEPT_LANGUAGE=de, the AI agent knows it needs to translate the text into German. The example translation output is stored in messages_de.properties.

Build and Deploy the Project

mvn clean install

This is a Spring Boot project, so you can deploy it by simply using the main class: Application.java

Once deployed, you can access the app at:

https://localhost:8081

About

Generate translated displayed messages by Spring AI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 81.1%
  • HTML 18.9%