From e6cde4100e18104acc0311404e2743a9cfabd0c6 Mon Sep 17 00:00:00 2001 From: Konstantin Krivopustov Date: Wed, 13 May 2026 12:13:32 +0400 Subject: [PATCH 1/2] Add warning about admin password to project templates README --- .../project/application-kotlin/README.md | 2 ++ .../project/application-tabmod/README.md | 2 ++ .../content/project/application/README.md | 2 ++ .../content/project/rest-service/README.md | 30 +++++++++++++++++++ 4 files changed, 36 insertions(+) create mode 100644 jmix-templates/content/project/rest-service/README.md diff --git a/jmix-templates/content/project/application-kotlin/README.md b/jmix-templates/content/project/application-kotlin/README.md index 3b8bb3fdf4..16a27f2fd8 100644 --- a/jmix-templates/content/project/application-kotlin/README.md +++ b/jmix-templates/content/project/application-kotlin/README.md @@ -30,3 +30,5 @@ The application will be available at . The default user credentials are: * Login: `admin` * Password: `admin` + +**WARNING**: Change admin password and remove `ui.login.defaultUsername` and `ui.login.defaultPassword` application properties when deploying the application to production. \ No newline at end of file diff --git a/jmix-templates/content/project/application-tabmod/README.md b/jmix-templates/content/project/application-tabmod/README.md index 3b8bb3fdf4..16a27f2fd8 100644 --- a/jmix-templates/content/project/application-tabmod/README.md +++ b/jmix-templates/content/project/application-tabmod/README.md @@ -30,3 +30,5 @@ The application will be available at . The default user credentials are: * Login: `admin` * Password: `admin` + +**WARNING**: Change admin password and remove `ui.login.defaultUsername` and `ui.login.defaultPassword` application properties when deploying the application to production. \ No newline at end of file diff --git a/jmix-templates/content/project/application/README.md b/jmix-templates/content/project/application/README.md index 3b8bb3fdf4..16a27f2fd8 100644 --- a/jmix-templates/content/project/application/README.md +++ b/jmix-templates/content/project/application/README.md @@ -30,3 +30,5 @@ The application will be available at . The default user credentials are: * Login: `admin` * Password: `admin` + +**WARNING**: Change admin password and remove `ui.login.defaultUsername` and `ui.login.defaultPassword` application properties when deploying the application to production. \ No newline at end of file diff --git a/jmix-templates/content/project/rest-service/README.md b/jmix-templates/content/project/rest-service/README.md new file mode 100644 index 0000000000..4556e6ed7b --- /dev/null +++ b/jmix-templates/content/project/rest-service/README.md @@ -0,0 +1,30 @@ +# ${project_projectPrintableName} + +This is a web application based on the [Jmix](https://www.jmix.io) framework. + +## Getting Started + +The newly created project requires Java 21 and uses the embedded HSQL database. + +Use the following resources to learn more about Jmix: +* [Jmix Documentation](https://docs.jmix.io) +* [Online Demo Applications](https://www.jmix.io/live-demo) +* [Jmix AI Assistant](https://ai-assistant.jmix.io) (also available in the **Jmix AI** tool window of IntelliJ IDEA) + +## Development + +- [Setup](https://docs.jmix.io/jmix/setup.html) your development environment. +- [Open](https://docs.jmix.io/jmix/studio/project.html#opening-existing-project) the project in the IDE. +- If you want to use AI agents to develop the application, check out the [Jmix AI Agent Guidelines](https://github.com/jmix-framework/jmix-agent-guidelines) repository. + +## Running + +To start the application, use the **${project_projectPrintableName} Jmix Application** run configuration in your IDE, or run the following command in the project root directory: + +```bash +./gradlew bootRun +``` + +The application will be available at . + +See [Jmix REST API documentation](https://docs.jmix.io/jmix/rest) for more information. \ No newline at end of file From cca4ca312e22e8afa4dcb73be2ec05fde352566b Mon Sep 17 00:00:00 2001 From: Konstantin Krivopustov Date: Wed, 13 May 2026 16:44:31 +0400 Subject: [PATCH 2/2] Add warning about admin password to login window --- .../${project_rootPath}/view/login/LoginView.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/jmix-templates/content/project/application/src/main/java/${project_rootPath}/view/login/LoginView.java b/jmix-templates/content/project/application/src/main/java/${project_rootPath}/view/login/LoginView.java index 0fa8d9a1fc..eb44cf2a3f 100644 --- a/jmix-templates/content/project/application/src/main/java/${project_rootPath}/view/login/LoginView.java +++ b/jmix-templates/content/project/application/src/main/java/${project_rootPath}/view/login/LoginView.java @@ -3,6 +3,7 @@ import com.vaadin.flow.component.UI; import com.vaadin.flow.component.login.AbstractLogin.LoginEvent; import com.vaadin.flow.component.login.LoginI18n; +import com.vaadin.flow.component.notification.Notification; import com.vaadin.flow.i18n.LocaleChangeEvent; import com.vaadin.flow.i18n.LocaleChangeObserver; import com.vaadin.flow.router.Route; @@ -10,6 +11,7 @@ import io.jmix.core.CoreProperties; import io.jmix.core.MessageTools; import io.jmix.core.security.AccessDeniedException; +import io.jmix.flowui.Notifications; import io.jmix.flowui.component.loginform.JmixLoginForm; import io.jmix.flowui.kit.component.ComponentUtils; import io.jmix.flowui.kit.component.loginform.JmixLoginI18n; @@ -46,6 +48,9 @@ public class LoginView extends StandardView implements LocaleChangeObserver { @Autowired private MessageTools messageTools; + @Autowired + private Notifications notifications; + @ViewComponent private JmixLoginForm login; @@ -62,6 +67,16 @@ public class LoginView extends StandardView implements LocaleChangeObserver { public void onInit(final InitEvent event) { initLocales(); initDefaultCredentials(); + showWarningIfDefaultCredentials(); + } + + private void showWarningIfDefaultCredentials() { + if ("admin".equals(defaultPassword)) { + notifications.create("WARNING: Change admin password and remove ui.login.default* properties when deploying the application to production") + .withPosition(Notification.Position.BOTTOM_CENTER) + .withDuration(10000) + .show(); + } } private void initLocales() {