{"id":380274,"date":"2024-06-28T21:01:16","date_gmt":"2024-06-28T21:01:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=380274"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=380274","title":{"rendered":"<span>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043c \u0438 \u043d\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Jmix<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e DevOps\u2019\u0430\u043c, \u043d\u043e \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043f\u043e\u0438\u0441\u043a\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0443\u0437\u043a\u0438\u0445 \u043c\u0435\u0441\u0442 \u0432 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0434\u043b\u044f Jmix-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c\u0441\u044f \u043a \u0435\u0433\u043e \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u043c\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Jmix \u0432 \u0441\u0438\u043b\u0443 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Vaadin, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430 UI \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0441 \u0431\u0435\u043a\u0435\u043d\u0434\u043e\u043c, \u043d\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u0437\u043d\u0430\u0447\u0438\u0442 \u0438 \u0442\u043e, \u0447\u0442\u043e \u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e, \u0442.\u0435. \u0437\u0430\u043c\u0435\u0440\u044f\u0442\u044c \u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f.\u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/325\/68a\/dcc\/32568adccdfc21050d49a1e42c4e2724.png\" width=\"1200\" height=\"630\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/325\/68a\/dcc\/32568adccdfc21050d49a1e42c4e2724.png\"\/><\/figure>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043c\u0435\u0442\u0440\u0438\u043a\u0438<\/h2>\n<p>\u0414\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0441\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 IntelliJ IDEA \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c Jmix.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c jmix-onboarding. \u042d\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 Hello World, \u0442.\u0435. \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>\u0414\u043b\u044f \u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0431\u0435 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0432 \u0441\u0440\u0435\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u044b\u0431\u0435\u0440\u0435\u043c File -> New -> Project from Version Control \u0438 \u0432 \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0435\u043c\u0441\u044f \u0434\u0438\u0430\u043b\u043e\u0433\u0435 \u0443\u043a\u0430\u0436\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f: <a href=\"https:\/\/github.com\/jmix-framework\/jmix-onboarding-2.git\"><u>https:\/\/github.com\/jmix-framework\/jmix-onboarding-2.git<\/u><\/a><\/p>\n<p>\u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u0433\u043e\u0442\u043e\u0432 \u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0438 \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f Actuator \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 build.gradle \u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"kotlin\">    implementation 'org.springframework.boot:spring-boot-starter-actuator'     implementation 'io.micrometer:micrometer-registry-prometheus'<\/code><\/pre>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b. \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0445 \u0432 application.properties \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438:<\/p>\n<pre><code>management.endpoints.web.exposure.include=prometheus,health,info,metrics management.endpoint.health.show-details=always<\/code><\/pre>\n<h2>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e<\/h2>\n<p> \u0412 Jmix \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0432\u043a\u043b\u044e\u0447\u0435\u043d Spring Security, \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043a \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0431\u0438\u043d.<\/p>\n<pre><code class=\"java\">@Configuration public class ActuatorSecurityConfiguration {     @Bean     @Order(JmixSecurityFilterChainOrder.FLOWUI - 10)     public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {         http.securityMatcher(\"\/actuator\/**\")                 .authorizeHttpRequests((authorize) -> authorize.requestMatchers(\"\/actuator\/**\").permitAll());         return http.build();     } }<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433 docker \u0438 \u0432 \u043d\u0435\u043c \u0444\u0430\u0439\u043b docker-compose.yml \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 PostgreSQL:<\/p>\n<pre><code class=\"yaml\">services:   jmix-onboarding-postgres:     container_name: jmix-onboarding-postgres     image: postgres:latest     ports:       - \"5432:5432\"     volumes:       - postgres:\/var\/lib\/postgresql\/data       - storage:\/storage     environment:       - POSTGRES_USER=onboarding       - POSTGRES_PASSWORD=onboarding       - POSTGRES_DB=onboarding   Jmix-onboarding:     container_name: jmix-onboarding     image: jmix-onboarding:0.0.1-SNAPSHOT     ports:       - \"8080:8080\"     environment:       - DB_HOST=jmix-onboarding-postgres       - DB_USER=onboarding       - DB_PASSWORD=onboarding       - DB_PORT=5432       - DB_NAME=onboarding     depends_on:       - jmix-onboarding-postgres volumes:   postgres: {}   storage: {}<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 application-prod.properties \u0441 \u0434\u0430\u0442\u0430\u0441\u043e\u0440\u0441\u043e\u043c \u0434\u043b\u044f PostgreSQL \u0438\u0437 Docker:<\/p>\n<pre><code class=\"yaml\">main.datasource.url = jdbc:postgresql:\/\/${DB_HOST}:${DB_PORT}\/${DB_NAME} main.datasource.username = ${DB_USER} main.datasource.password =${DB_PASSWORD} jmix.localfs.storage-dir = \/storage<\/code><\/pre>\n<p>\u0414\u0430\u0442\u0430\u0441\u043e\u0440\u0441 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u044b\u0442\u0430\u0449\u0438\u043c \u0438\u0437 application.properties \u0432 application-dev.properties<\/p>\n<pre><code class=\"yaml\">main.datasource.url = jdbc:hsqldb:file:.jmix\/hsqldb\/onboarding main.datasource.username = sa main.datasource.password =<\/code><\/pre>\n<p> \u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 PostgreSQL \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0421\u0423\u0411\u0414 \u0432 \u0441\u0435\u043a\u0446\u0438\u044e dependencies \u0444\u0430\u0439\u043b\u0430 build.gradle<\/p>\n<pre><code class=\"yaml\">    runtimeOnly 'org.postgresql:postgresql'<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u043b\u0438\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 build.gradle \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u044f:<\/p>\n<pre><code class=\"kotlin\">bootRun {     args = [\"--spring.profiles.active=dev\"] }  tasks.named(\"bootBuildImage\") {     environment[\"BPE_APPEND_JAVA_TOOL_OPTIONS\"] = \" -Dspring.profiles.active=prod\" }<\/code><\/pre>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c Docker-\u043e\u0431\u0440\u0430\u0437:<\/p>\n<pre><code class=\"bash\">.\/gradlew bootBuildImage -Pvaadin.productionMode=true<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b:<\/p>\n<pre><code class=\"bash\"> docker compose -f .\/docker\/docker-compose.yml up -d<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u0434\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430:<\/p>\n<pre><code class=\"bash\">curl http:\/\/localhost:8080\/actuator\/prometheus<\/code><\/pre>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e docker\/config\/grafana\/provisioning\/datasources\/all.yaml \u0441 \u0434\u0430\u0442\u0430\u0441\u043e\u0440\u0441\u043e\u043c \u043f\u0440\u043e\u043c\u0435\u0442\u0435\u0443\u0441\u0430:<\/p>\n<pre><code class=\"yaml\">apiVersion: 1   datasources:   - name: Prometheus     label: Prometheus     type: prometheus     access: proxy     url: http:\/\/prometheus:9090     isDefault: true<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c Docker-\u0444\u0430\u0439\u043b \u0434\u043b\u044f Graphana docker\/config\/grafana\/Dockerfile<\/p>\n<pre><code class=\"bash\">FROM grafana\/grafana ADD .\/provisioning \/etc\/grafana\/provisioning<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c docker\/config\/prometheus.yml<\/p>\n<pre><code class=\"yaml\">scrape_configs:   - job_name: 'onboarding_monitoring'     scrape_interval: 5s     metrics_path: '\/actuator\/prometheus'     static_configs:       - targets: ['jmix-onboarding:8080']<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c docker\/monitoring.yml<\/p>\n<pre><code class=\"yaml\">services:   grafana:     build: '.\/config\/grafana'     user: root     ports:       - 3000:3000     volumes:       - .\/grafana:\/var\/lib\/grafana     environment:       - GF_SECURITY_ADMIN_USER=admin       - GF_SECURITY_ADMIN_PASSWORD=admin   prometheus:     image: prom\/prometheus     user: root     ports:       - 9090:9090     volumes:       - .\/config\/prometheus.yml:\/etc\/prometheus\/prometheus.yml       - .\/prometheus:\/prometheus<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433:<\/p>\n<pre><code class=\"bash\">docker compose -f .\/docker\/monitoring.yml start<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0439\u0442\u0438 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Prometheus, \u043e\u0442\u043a\u0440\u044b\u0432 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 <a href=\"http:\/\/172.17.0.1:9090\/\"><u>http:\/\/localhost:9090<\/u><\/a> \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u0443\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043c\u0435\u0442\u0440\u0438\u043a \u0442\u0430\u043c \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0439.<\/p>\n<h2> \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u043d\u0435\u043b\u0438 \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438<\/h2>\n<p>\u0414\u043b\u044f Grafana \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 JVM-\u0434\u0430\u0448\u0431\u043e\u0440\u0434 (<a href=\"https:\/\/grafana.com\/grafana\/dashboards\/4701-jvm-micrometer\/\"><u>https:\/\/grafana.com\/grafana\/dashboards\/4701-jvm-micrometer\/.)<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u041d\u043e \u043c\u044b \u043f\u043e\u0439\u0434\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u044b \u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Jmix \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0412 Jmix \u0443\u0436\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u0441\u0431\u043e\u0440 \u043c\u0435\u0442\u0440\u0438\u043a \u0434\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0435\u0434\u0438\u043d\u0438\u0446 &#8212; \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 (Views) \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445(Data Loaders) \u0438 \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0438 \u044d\u043a\u0440\u0430\u043d\u044b \u0438 \u043f\u0438\u0448\u0435\u0442\u0435 \u0432 \u043d\u0438\u0445 \u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e.  <\/p>\n<p> \u0414\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 jmix.ui.views<\/p>\n<p> \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u044d\u0433\u0438: lifeCycle, view \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u044f\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0437\u044b \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430:<\/p>\n<ul>\n<li>\n<p>Create<\/p>\n<\/li>\n<li>\n<p>Load<\/p>\n<\/li>\n<li>\n<p>Init<\/p>\n<\/li>\n<li>\n<p>Before show<\/p>\n<\/li>\n<li>\n<p>Ready<\/p>\n<\/li>\n<li>\n<p>Inject<\/p>\n<\/li>\n<li>\n<p>Before close<\/p>\n<\/li>\n<li>\n<p>After close<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043b\u044f Prometheus \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:  <\/p>\n<pre><code>jmix_ui_views_seconds_max{lifeCycle=\"load\",view=\"User.list\",} 0.0412709<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 jmix.ui.data<\/p>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u044d\u0433\u0438: lifeCycle, view, dataLoader \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u044f\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0437\u044b \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430:<\/p>\n<ul>\n<li>\n<p> Pre-load<\/p>\n<\/li>\n<li>\n<p> Load<\/p>\n<\/li>\n<li>\n<p>Post-load<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430\u043f\u0438\u0441\u044c \u043c\u0435\u0442\u0440\u0438\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d Id<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u0430\u0442\u0430\u043b\u043e\u0430\u0434\u0435\u0440\u0430 \u0434\u043b\u044f Prometheus:<\/p>\n<pre><code>jmix_ui_data_seconds_max{dataLoader=\"usersDl\",lifeCycle=\"load\",view=\"User.list\",} 0.005668899<\/code><\/pre>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430 <a href=\"http:\/\/172.17.0.1:3000\/\"><u>http:\/\/localhost:3000<\/u><\/a> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u0438 \u0432 \u043d\u0435\u0433\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u043e\u0440\u0441\u0430 Prometheus<\/p>\n<pre><code>jmix_ui_data_seconds_max{dataLoader=\"usersDl\"} -> dashboards<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 Explore \u0432\u044b\u0431\u0440\u0430\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0434\u0430\u0442\u0430\u0441\u043e\u0440\u0441 \u0438 \u0432\u0432\u043e\u0434\u044f \u0438\u043c\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u0435\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u044b\u0431\u043e\u0440\u0430. \u041f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e Run query \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0433\u0440\u0430\u0444\u0438\u043a\u0430. \u041d\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u0442.\u0435. \u043d\u0430\u0434\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u0437\u0430\u0439\u0442\u0438 \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6b5\/070\/a98\/6b5070a98096686304e75cd1822b5fc6.png\" width=\"1846\" height=\"819\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6b5\/070\/a98\/6b5070a98096686304e75cd1822b5fc6.png\"\/><\/figure>\n<h2> \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0432\u043e\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438<\/h2>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 API Micrometer \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0432\u043e\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438: \u0442\u0430\u0439\u043c\u0435\u0440\u044b, \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0438. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u0432 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a0e\/3a3\/3d5\/a0e3a33d5b4768a98d74d1089856356b.png\" width=\"848\" height=\"467\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a0e\/3a3\/3d5\/a0e3a33d5b4768a98d74d1089856356b.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6a4\/2e3\/fd0\/6a42e3fd005952b64d0c2e6e1f9c60a7.png\" width=\"576\" height=\"469\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6a4\/2e3\/fd0\/6a42e3fd005952b64d0c2e6e1f9c60a7.png\"\/><\/figure>\n<p>\u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 User, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"java\">package com.company.onboarding.listener;  import com.company.onboarding.entity.User; import io.jmix.core.event.EntitySavingEvent; import io.micrometer.core.instrument.MeterRegistry; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.event.EventListener; import org.springframework.stereotype.Component;  @Component public class UserEventListener {      @Autowired     MeterRegistry meterRegistry;      @EventListener     public void onUserLoading(final EntitySavingEvent&lt;User> event) {         meterRegistry.counter(\"onboarding_on_user_save\").increment();     } }<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0438 \u043f\u043e\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u043c\u0438 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bde\/d56\/d08\/bded56d08c027580a7435644d36631e9.png\" width=\"883\" height=\"978\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bde\/d56\/d08\/bded56d08c027580a7435644d36631e9.png\"\/><\/figure>\n<h2>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 REST \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<p>\u0414\u043b\u044f Jmix \u0435\u0441\u0442\u044c \u0430\u0434\u0434\u043e\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043a \u043d\u0438\u043c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432 OpenAPI. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u0430\u0442\u0440\u0430\u0442\u0430\u043c\u0438 \u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 (backoffice) \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0442\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0442\u0430\u043a \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0441 \u043d\u0438\u043c\u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438.<\/p>\n<p>\u0414\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0430\u0434\u0434\u043e\u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 build.properties \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439:<\/p>\n<pre><code class=\"kotlin\">implementation 'io.jmix.authserver:jmix-authserver-starter'  implementation 'io.jmix.rest:jmix-rest-starter'<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u0432 \u0444\u0430\u0439\u043b\u0435 application.properties:<\/p>\n<pre><code class=\"yaml\"># The client id is my-client  spring.security.oauth2.authorizationserver.client.myclient.registration.client-id=my-client # The client secret (password) is my-secret  spring.security.oauth2.authorizationserver.client.myclient.registration.client-secret={noop}my-secret  # Enable Client Credential grant for the my-client  spring.security.oauth2.authorizationserver.client.myclient.registration.authorization-grant-types=client_credentials  # Client credentials must be passed in the Authorization header using the HTTP Basic authentication scheme  spring.security.oauth2.authorizationserver.client.myclient.registration.client-authentication_methods=client_secret_basic  # Use opaque tokens instead of JWT  spring.security.oauth2.authorizationserver.client.myclient.token.access-token-format=reference  # access token time-to-live  spring.security.oauth2.authorizationserver.client.myclient.token.access-token-time-to-live=24h jmix.authserver.client.myclient.client-id = my-client  jmix.authserver.client.myclient.resource-roles = user-management, rest-minimal<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u0440\u043e\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432 \u043f\u0430\u043a\u0435\u0442\u0435 com.company.onboarding.security:<\/p>\n<pre><code class=\"java\">@ResourceRole(name = \"User management\", code = UserManagementRole.CODE, scope = \"API\") public interface UserManagementRole {      String CODE = \"user-management\";      @EntityAttributePolicy(entityClass = User.class, attributes = \"*\", action = EntityAttributePolicyAction.MODIFY)     @EntityPolicy(entityClass = User.class, actions = EntityPolicyAction.ALL)     void user(); }<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0435\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430:<\/p>\n<pre><code class=\"bash\">curl -X POST http:\/\/localhost:8080\/oauth2\/token --basic --user my-client:my-secret -H \"Content-Type: application\/x-www-form-urlencoded\" -d \"grant_type=client_credentials\"<\/code><\/pre>\n<p>\u0418 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0432 \u043d\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"bash\">curl -X GET http:\/\/localhost:8080\/rest\/entities\/User -H \"Authorization: Bearer &lt;access_token>\"<\/code><\/pre>\n<h3> \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c JMeter<\/h3>\n<p>JMeter &#8212; \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 no\/low-code \u0435\u0449\u0435 \u0434\u043e \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0442\u0430\u043b\u043e \u043c\u0435\u0439\u043d\u0441\u0442\u0440\u0438\u043c\u043e\u043c.  <\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 JMeter \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c JDK 11 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435.<br \/>\u041c\u043d\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0448\u0435\u043b\u043b-\u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432 \/usr\/local\/bin c \u0442\u0430\u043a\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c:<\/p>\n<pre><code class=\"bash\">#!\/bin\/bash export JAVA_HOME=\/usr\/lib\/jvm\/java-11-openjdk-amd64\/ \/opt\/apache-jmeter-5.6.3\/bin\/jmeter<\/code><\/pre>\n<h3> \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0442\u0435\u0441\u0442\u044b<\/h3>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ded\/7af\/4ec\/ded7af4ecc275101c34756fc9aa4eb07.png\" width=\"908\" height=\"446\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ded\/7af\/4ec\/ded7af4ecc275101c34756fc9aa4eb07.png\"\/><\/figure>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c Thread Group \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, REST Users<\/p>\n<p>\u0423\u0431\u0435\u0440\u0435\u043c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u0441 Infinite \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c 20 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439 \u0434\u043b\u044f 10\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/547\/f7e\/1e0\/547f7e1e0f659a06c8e367a7cc403700.png\" width=\"1149\" height=\"441\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/547\/f7e\/1e0\/547f7e1e0f659a06c8e367a7cc403700.png\"\/><\/figure>\n<h3>\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f<\/h3>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u0437\u0430\u043a\u0440\u044b\u0442 \u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e, \u0442\u0440\u0435\u0434\u0433\u0440\u0443\u043f\u043f\u0430\u043c JMeter \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u0437\u0430 \u0441\u0435\u0430\u043d\u0441. \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442 If Controller \u0438\u0437 \u0433\u0440\u0443\u043f\u043f\u044b Logic Controller. \u041d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e Authenticate.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0433\u043e HTTP \u0441\u0435\u043c\u043f\u043b\u0435\u0440 \u0434\u043b\u044f POST-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \/oauth2\/token  <\/p>\n<p>\u0418\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e grant_type=client_credentials<\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043e\u0444\u043e\u0440\u043c\u0438\u043c \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 Thread Group\u2019\u044b, \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a ${__V(\u0438\u043c\u044f_\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439)}<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3cc\/289\/74d\/3cc28974da757fe759b729bdfc50d53b.png\" width=\"1534\" height=\"868\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3cc\/289\/74d\/3cc28974da757fe759b729bdfc50d53b.png\"\/><\/figure>\n<p>\u041d\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 Authorization. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 Authenticate \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 HTTP Header Manager \u0438 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 Authorization Basic bXktY2xpZW50Om15LXNlY3JldA==.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/473\/c11\/b6c\/473c11b6c2a4066196ef35a33e9e3ad7.png\" width=\"1533\" height=\"358\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/473\/c11\/b6c\/473c11b6c2a4066196ef35a33e9e3ad7.png\"\/><\/figure>\n<p>\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0441\u0442\u0440\u043e\u043a \u043b\u043e\u0433\u0438\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c \u201c:\u201d \u0438 \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0432 Base64. \u042f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043e\u043d\u043b\u0430\u0439\u043d \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c-\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u043e\u0440\u043e\u043c \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f \u043c\u043e\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0418 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c HTTP \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c IntelliJ IDEA \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043b\u0430\u0434\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/06f\/3f0\/30c\/06f3f030c7725f18f66976330c3214a2.png\" width=\"896\" height=\"582\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/06f\/3f0\/30c\/06f3f030c7725f18f66976330c3214a2.png\"\/><\/figure>\n<p>\u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 If Controller \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435:<\/p>\n<pre><code class=\"kotlin\">${__groovy(ctx.getThreadNum() == 0 &amp;&amp;  vars.getIteration() == 1,)}<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0433\u043e JSON Extractor \u0438\u0437 Post Processors \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u0442\u043e\u043a\u0435\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/p>\n<pre><code class=\"kotlin\">$.access_token<\/code><\/pre>\n<p>\u0412 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e access_token<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ebd\/5e2\/7b0\/ebd5e27b082b993d348c18ee2da250e2.png\" width=\"860\" height=\"441\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ebd\/5e2\/7b0\/ebd5e27b082b993d348c18ee2da250e2.png\"\/><\/figure>\n<p>\u0418 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u043a\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f BeanShell Assertation \u0441 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c:<\/p>\n<pre><code class=\"kotlin\">${__setProperty(access_token, ${access_token})};<\/code><\/pre>\n<h3>\u0417\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/h3>\n<p>\u0412 \u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043c HTTP \u0441\u044d\u043c\u043f\u043b\u0435\u0440 Users List \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 rest\/entities\/User<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/da6\/8cc\/a95\/da68cca95ffb7a487f8566b874017e0f.png\" width=\"1149\" height=\"441\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/da6\/8cc\/a95\/da68cca95ffb7a487f8566b874017e0f.png\"\/><\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c HTTP Header Manager  <\/p>\n<p>\u0418 BeanShell PreProcessor \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u043c \u0432 \u0442\u0430\u043a\u0438\u043c \u043a\u043e\u0434\u0435:<\/p>\n<pre><code class=\"kotlin\">import org.apache.jmeter.protocol.http.control.Header;  var authHeader = sampler.getHeaderManager().getFirstHeaderNamed(\"Authorization\"); if (authHeader == null) {     sampler.getHeaderManager().add(new Header(\"Authorization\", \"Bearer\" + props.get(\"access_token\"))); } else {     authHeader.setValue(\"Bearer\" + props.get(\"access_token\")); }<\/code><\/pre>\n<p>\u0412 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043c HTTP Cookie Manager \u0438\u0437 \u043f\u043e\u0434\u043c\u0435\u043d\u044e Add -> Config Element.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c Summary Report \u0438\u0437 \u043f\u043e\u0434\u043c\u0435\u043d\u044e Add -> Listener.<\/p>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433.<\/p>\n<p>\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u201c\u0421\u0442\u043e\u043f\u201d, \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 Summary Report \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c.<\/p>\n<h2>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432<\/h2>\n<h3>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 UI-\u0442\u0435\u0441\u0442\u043e\u0432<\/h3>\n<p>JMeter \u0442\u0430\u043a\u0436\u0435 \u0443\u043c\u0435\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 WebDriver, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u043d\u0438\u0445.<\/p>\n<p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 ChromeDriver \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 114, \u0441\u043e\u0432\u043c\u0435\u0449\u0430\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0441 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c GeckoDriver \u0438 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u043c Firefox ESR<\/p>\n<p>\u0412 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 \u0442\u0430 \u0436\u0435 \u043b\u043e\u0433\u0438\u043a\u0430: \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435. \u041d\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b WebDriver Sampler, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043a\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0443\u044e\u0449\u0438\u0439 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/838\/ba1\/e24\/838ba1e243d32c793170eb3d6531ce15.png\" width=\"1148\" height=\"679\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/838\/ba1\/e24\/838ba1e243d32c793170eb3d6531ce15.png\"\/><\/figure>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043a\u0440\u0438\u043f\u0442 \u0432\u0445\u043e\u0434\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u043b\u044f Jmix 2.x \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"javascript\">var props = WDS.vars  WDS.sampleResult.sampleStart() WDS.browser.get(props.get('jmix_proto') + ':\/\/' + props.get('jmix_host') + ':' + props.get('jmix_port'))  var pkg = JavaImporter(org.openqa.selenium, org.openqa.selenium.support.ui) var wait = new pkg.WebDriverWait(WDS.browser, java.time.Duration.ofSeconds(100))  \/\/ wait for login screen wait.until(pkg.ExpectedConditions.presenceOfElementLocated(pkg.By.cssSelector('input[name=username]')))  var login = WDS.browser.findElement(pkg.By.cssSelector('input[name=username]')) var password = WDS.browser.findElement(pkg.By.cssSelector('input[name=password]')) var submit = WDS.browser.findElement(pkg.By.cssSelector('vaadin-button[slot=submit]'))  login.clear() login.sendKeys(['admin']) password.clear() password.sendKeys(['admin']) submit.click()  \/\/ wait main app screen  wait.until(pkg.ExpectedConditions.presenceOfElementLocated(pkg.By.cssSelector('vaadin-app-layout[id=\"MainView\"]')))  var appMenu = WDS.browser.findElement(pkg.By.cssSelector('a[href=users]')) appMenu.click()  wait.until(pkg.ExpectedConditions.presenceOfElementLocated(pkg.By.cssSelector('[id=\"usersDataGrid\"]')))  WDS.sampleResult.sampleEnd()<\/code><\/pre>\n<p> \u0421\u043a\u0440\u0438\u043f\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0432 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"javascript\">var props = WDS.vars var pkg = JavaImporter(org.openqa.selenium, org.openqa.selenium.support.ui) var wait = new pkg.WebDriverWait(WDS.browser, java.time.Duration.ofSeconds(120)) var tu = JavaImporter(java.util.concurrent.TimeUnit)  WDS.sampleResult.sampleStart() WDS.browser.manage().window().setPosition(new pkg.Point(0, 0)) WDS.browser.manage().window().setSize(new pkg.Dimension(1280, 1024)) WDS.browser.get(props.get('jmix_proto') + ':\/\/' + props.get('jmix_host') + ':' + props.get('jmix_port')) wait.until(pkg.ExpectedConditions.presenceOfElementLocated(pkg.By.cssSelector('vaadin-app-layout[id=\"MainView\"]'))) var usersMenu = WDS.browser.findElement(pkg.By.cssSelector('a[href=\"users\"]'))  usersMenu.click()  wait.until(pkg.ExpectedConditions.presenceOfElementLocated(pkg.By.cssSelector('[id=\"usersDataGrid\"]')))  var tableRow  = WDS.browser.findElement(pkg.By.cssSelector('[id=\"usersDataGrid\"]')).getShadowRoot().findElements(pkg.By.cssSelector('table tbody tr td')).get(0) tableRow.click()  wait.until(pkg.ExpectedConditions.presenceOfElementLocated(pkg.By.cssSelector('[id=\"editBtn\"]:not(.v-disabled)')))  var editButton = WDS.browser.findElement(pkg.By.cssSelector('[id=\"editBtn\"]')) editButton.click()  wait.until(pkg.ExpectedConditions.presenceOfElementLocated(pkg.By.cssSelector('[id=\"closeBtn\"]')))  var closeButton = WDS.browser.findElement(pkg.By.cssSelector('[id=\"closeBtn\"]')) closeButton.click()  WDS.sampleResult.sampleEnd() WDS.sampleResult.setSuccessful(true)<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u0435\u0449\u0435 \u0432\u0430\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f jmix.host  \u0434\u043e\u043b\u0436\u043d\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u044b \u043b\u0438\u0431\u043e \u043d\u0430 Docker-\u0445\u043e\u0441\u0442 172.17.0.1. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c:<\/p>\n<pre><code class=\"bash\">.\/gradlew -Pvaadin.productionMode=true bootBuildImage<\/code><\/pre>\n<p>\u0410 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e:<\/p>\n<pre><code class=\"bash\">docker run -it docker.io\/library\/jmix-onboarding:0.0.1-SNAPSHOT<\/code><\/pre>\n<p> \u0433\u0434\u0435 jmix-onboarding:0.0.1-SNAPSHOT \u044d\u0442\u043e \u0438\u043c\u044f \u043e\u0431\u0440\u0430\u0437\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0430\u043c \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0443 \u0432\u0430\u0441 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 DockerHub, \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0440\u0435\u0435\u0441\u0442\u0440\u0430 Docker-\u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u201c\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 Java-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0432 GitLab\u201d (<a href=\"https:\/\/habr.com\/ru\/companies\/haulmont\/articles\/810151\/\"><u>https:\/\/habr.com\/ru\/companies\/haulmont\/articles\/810151\/<\/u><\/a>).<\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u043e\u0432 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0432\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u043b\u0438 \u0432\u0435\u0441\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 Jmix Flow UI \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 HTML \u043a\u043e\u0434, \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u0432\u044b\u0431\u043e\u0440\u043a\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, \u043d\u0430\u0434\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u201c\u0432\u043d\u0443\u0442\u0440\u044f\u043d\u043a\u0430\u201d \u043c\u043d\u043e\u0433\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0440\u044f\u0442\u0430\u043d\u0430 \u0432 \u0442\u0435\u043d\u0435\u0432\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e (Shadow DOM), \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0438\u0441\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 getShadowRoot(), \u043a\u0430\u043a \u0432\u043e\u0442 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435:<\/p>\n<pre><code class=\"javascript\">var tableRow  = WDS.browser.findElement(pkg.By.cssSelector('[id=\"usersDataGrid\"]')).getShadowRoot().findElements(pkg.By.cssSelector('table tbody tr td')).get(0)<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0435\u0439 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430, \u0432\u044b\u0437\u0432\u0430\u043d\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0447\u0442\u043e\u0431\u044b \u0442\u0435\u0441\u0442\u044b \u043d\u0435 \u0437\u0430\u0432\u0430\u043b\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u043d\u0430\u043f\u0440\u0430\u0441\u043d\u0443 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u0435\u0437\u0434\u0435 \u0432 \u0442\u0430\u043a\u0438\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u0445 \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 wail.until (WebDriverWait) \u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432.<\/p>\n<p>\u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a Selenium IDE.<\/p>\n<h2>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043d\u0430\u0441 \u043a \u043c\u044b\u0441\u043b\u0438 \u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0438\u0445 \u0432 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445. \u041a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u044d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043c \u043d\u0435 \u0434\u0430\u0443\u043d\u0433\u0440\u0435\u0439\u0434\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0434\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0445 \u0441 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u043e\u0441\u043d\u0430\u0441\u0442\u043a\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0439. \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f Docker-\u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435-\u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 ffjmeter.<\/p>\n<pre><code class=\"bash\">FROM ubuntu:22.04  ARG JMETER_VERSION=\"5.6.3\" ENV JMETER_HOME \/opt\/apache-jmeter-${JMETER_VERSION} ENV JMETER_BIN ${JMETER_HOME}\/bin ENV JMETER_PLUGINS_MANAGER_VERSION 1.3 ENV CMDRUNNER_VERSION 2.2 ARG GECKODRIVER_VERSION=0.34.0  ENV JMETER_DOWNLOAD_URL https:\/\/archive.apache.org\/dist\/jmeter\/binaries\/apache-jmeter-${JMETER_VERSION}.tgz  RUN apt-get -qq update RUN apt-get -qq -y install software-properties-common RUN add-apt-repository ppa:mozillateam\/ppa RUN apt install wget gnupg unzip curl openjdk-11-jdk-headless firefox-esr -y RUN mkdir -p \/tmp\/dependencies &amp;&amp; \\   curl -L --silent ${JMETER_DOWNLOAD_URL} > \/tmp\/dependencies\/apache-jmeter-${JMETER_VERSION}.tgz &amp;&amp; \\   mkdir -p \/opt &amp;&amp; \\   tar -xzf \/tmp\/dependencies\/apache-jmeter-${JMETER_VERSION}.tgz -C \/opt &amp;&amp; \\   rm -rf \/tmp\/dependencies  ENV PATH $PATH:$JMETER_BIN  WORKDIR ${JMETER_HOME}\/bin  RUN curl --location --silent --show-error --output ${JMETER_HOME}\/lib\/ext\/jmeter-plugins-manager-${JMETER_PLUGINS_MANAGER_VERSION}.jar \\     http:\/\/search.maven.org\/remotecontent?filepath=kg\/apc\/jmeter-plugins-manager\/${JMETER_PLUGINS_MANAGER_VERSION}\/jmeter-plugins-manager-${JMETER_PLUGINS_MANAGER_VERSION}.jar \\  &amp;&amp; curl --location --silent --show-error --output ${JMETER_HOME}\/lib\/cmdrunner-${CMDRUNNER_VERSION}.jar \\     http:\/\/search.maven.org\/remotecontent?filepath=kg\/apc\/cmdrunner\/${CMDRUNNER_VERSION}\/cmdrunner-${CMDRUNNER_VERSION}.jar \\  &amp;&amp; curl --location --silent --show-error --output ${JMETER_HOME}\/lib\/jmeter-plugins-webdriver-4.9.1.0.jar \\     https:\/\/repo1.maven.org\/maven2\/kg\/apc\/jmeter-plugins-webdriver\/4.9.1.0\/jmeter-plugins-webdriver-4.9.1.0.jar \\  &amp;&amp; curl --location --silent --show-error --output ${JMETER_HOME}\/lib\/selenium-remote-driver-4.9.1.jar \\     https:\/\/repo1.maven.org\/maven2\/org\/seleniumhq\/selenium\/selenium-remote-driver\/4.9.1\/selenium-remote-driver-4.9.1.jar \\  &amp;&amp; curl --location --silent --show-error --output ${JMETER_HOME}\/lib\/selenium-api-4.21.0.jar \\     https:\/\/repo1.maven.org\/maven2\/org\/seleniumhq\/selenium\/selenium-api\/4.21.0\/selenium-api-4.21.0.jar  RUN ln -sf \/usr\/bin\/firefox-esr \/usr\/bin\/firefox  RUN java -cp ${JMETER_HOME}\/lib\/ext\/jmeter-plugins-manager-${JMETER_PLUGINS_MANAGER_VERSION}.jar org.jmeterplugins.repository.PluginManagerCMDInstaller  RUN curl -fL -o \/tmp\/geckodriver.tar.gz \\          https:\/\/github.com\/mozilla\/geckodriver\/releases\/download\/v${GECKODRIVER_VERSION}\/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz \\  &amp;&amp; tar -xzf \/tmp\/geckodriver.tar.gz -C \/tmp\/ \\  &amp;&amp; chmod +x \/tmp\/geckodriver \\  &amp;&amp; mv \/tmp\/geckodriver ${JMETER_HOME}\/bin  RUN .\/PluginsManagerCMD.sh install jpgc-webdriver webdriver-sampler jmeter-plugins-webdriver selenium-remote  COPY launch.sh \/usr\/local\/bin RUN chmod +x \/usr\/local\/bin\/launch.sh    ENTRYPOINT [\"\/usr\/local\/bin\/launch.sh\"] <\/code><\/pre>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u043a\u0443 launch.sh, \u0435\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0440\u044f\u0434\u043e\u043c \u0441 \u0442\u0430\u043a\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre><code class=\"bash\">#!\/bin\/bash  export JVM_ARGS=\"-Xms1024m -Xmx8G -XX:MaxMetaspaceSize=1024m\" echo \"JVM_ARGS=${JVM_ARGS}\" echo \"\/opt\/apache-jmeter-5.6.3\/bin\/jmeter args=$@\"  jmeter $@<\/code><\/pre>\n<p>\u041c\u0435\u043d\u044f\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b JVM_ARGS \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043b\u0438\u043c\u0438\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<p>\u0421\u043e\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 \u043e\u0431\u0440\u0430\u0437 \u0441 \u043c\u0435\u0442\u043a\u043e\u0439 ffjmeter \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"bash\">docker build -t docker\/ffjmeter .<\/code><\/pre>\n<p> \u0410 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u0443\u0434\u043e\u0431\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043a\u0440\u0438\u043f\u0442\u0438\u043a run_tests.sh:<\/p>\n<pre><code class=\"bash\">#!\/bin\/bash  NOW=$(date '+%Y-%m-%d_%H_%M'); JMX_FILENAME=\"jmix-benchmark.jmx\"; VOLUME_PATH=\"\/home\/${USER}\/projects\/testjmix-jmeter\"; JMETER_PATH=\"\/root\/jmeter\";  docker run --name \"jmeter_${NOW}\" --volume \"${VOLUME_PATH}\":\"${JMETER_PATH}\" docker\/ffjmeter -n -t \"${JMETER_PATH}\/${JMX_FILENAME}\" -l \"${JMETER_PATH}\/result_${NOW}.jtl\" -j \"${JMETER_PATH}\/jmeter_${NOW}.log\"  docker rm jmeter_${NOW}<\/code><\/pre>\n<p>VOLUME_PATH \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c JMeter-\u0442\u0435\u0441\u0442\u044b, \u0430 JMX_FILENAME \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u0430\u043a\u043e\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0433\u043e\u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u044f\u0442\u044c\u0441\u044f, \u0430 \u043b\u043e\u0433\u0438 \u0438 \u043e\u0442\u0447\u0435\u0442 \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f JTL-\u0444\u0430\u0439\u043b \u043e\u0442\u0447\u0435\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0443 \u0441 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0a2\/71c\/d52\/0a271cd52a47c5bc37736b5e8adcc8fb.png\" width=\"1237\" height=\"733\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0a2\/71c\/d52\/0a271cd52a47c5bc37736b5e8adcc8fb.png\"\/><\/figure>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u043e\u043b\u0435 \u0444\u043e\u0440\u043c\u044b \u043d\u0430\u0434\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u043e\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 CSV\/JTL-\u0444\u0430\u0439\u043b \u043e\u0442\u0447\u0435\u0442\u0430, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0439(\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439) \u0444\u0430\u0439\u043b \u0438 \u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u043c &#8212; \u043f\u0443\u0441\u0442\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dc9\/b3d\/1f4\/dc9b3d1f4eec37c343da3514cefd3397.png\" width=\"1826\" height=\"929\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dc9\/b3d\/1f4\/dc9b3d1f4eec37c343da3514cefd3397.png\"\/><\/figure>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0443 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u043a\u0430\u043a \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u0435\u0441\u0442\u043e\u0432, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u0440\u0435\u0434\u0435 \u043d\u0435\u043f\u0440\u0438\u0440\u044b\u0432\u043d\u043e\u0439 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 CI\/CD. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0432\u0435\u0441\u0442\u0438 \u043d\u0435 \u0432\u044b\u0445\u043e\u0434\u044f \u0438\u0437 \u0441\u0440\u0435\u0434 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u0435\u0441\u0442\u043e\u0432 JMeter \u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0410 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0436\u0438\u0432\u0443\u044e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0442\u0435\u0441\u0442\u043e\u0432. \u0421\u043e\u0447\u0435\u0442\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u0435\u0441\u0442\u043e\u0432 \u0441 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0438 \u0438\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u043e\u043a \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043a\u0430\u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438, \u0442\u0430\u043a \u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/30d\/2a7\/437\/30d2a74373bcb9b5bd7413cbc1ba130e.png\" width=\"1323\" height=\"746\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/30d\/2a7\/437\/30d2a74373bcb9b5bd7413cbc1ba130e.png\"\/><\/figure>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/825402\/\"> https:\/\/habr.com\/ru\/articles\/825402\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e DevOps\u2019\u0430\u043c, \u043d\u043e \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043f\u043e\u0438\u0441\u043a\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0443\u0437\u043a\u0438\u0445 \u043c\u0435\u0441\u0442 \u0432 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0434\u043b\u044f Jmix-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c\u0441\u044f \u043a \u0435\u0433\u043e \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u043c\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Jmix \u0432 \u0441\u0438\u043b\u0443 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Vaadin, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430 UI \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0441 \u0431\u0435\u043a\u0435\u043d\u0434\u043e\u043c, \u043d\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u0437\u043d\u0430\u0447\u0438\u0442 \u0438 \u0442\u043e, \u0447\u0442\u043e \u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e, \u0442.\u0435. \u0437\u0430\u043c\u0435\u0440\u044f\u0442\u044c \u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f.\u00a0<\/p>\n<figure class=\"full-width\"><\/figure>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043c\u0435\u0442\u0440\u0438\u043a\u0438<\/h2>\n<p>\u0414\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0441\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 IntelliJ IDEA \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c Jmix.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c jmix-onboarding. \u042d\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 Hello World, \u0442.\u0435. \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>\u0414\u043b\u044f \u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0431\u0435 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0432 \u0441\u0440\u0435\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u044b\u0431\u0435\u0440\u0435\u043c File -> New -> Project from Version Control \u0438 \u0432 \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0435\u043c\u0441\u044f \u0434\u0438\u0430\u043b\u043e\u0433\u0435 \u0443\u043a\u0430\u0436\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f: <a href=\"https:\/\/github.com\/jmix-framework\/jmix-onboarding-2.git\"><u>https:\/\/github.com\/jmix-framework\/jmix-onboarding-2.git<\/u><\/a><\/p>\n<p>\u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u0433\u043e\u0442\u043e\u0432 \u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0438 \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f Actuator \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 build.gradle \u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"kotlin\">    implementation 'org.springframework.boot:spring-boot-starter-actuator'     implementation 'io.micrometer:micrometer-registry-prometheus'<\/code><\/pre>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b. \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0445 \u0432 application.properties \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438:<\/p>\n<pre><code>management.endpoints.web.exposure.include=prometheus,health,info,metrics management.endpoint.health.show-details=always<\/code><\/pre>\n<h2>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e<\/h2>\n<p> \u0412 Jmix \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0432\u043a\u043b\u044e\u0447\u0435\u043d Spring Security, \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043a \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0431\u0438\u043d.<\/p>\n<pre><code class=\"java\">@Configuration public class ActuatorSecurityConfiguration {     @Bean     @Order(JmixSecurityFilterChainOrder.FLOWUI - 10)     public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {         http.securityMatcher(\"\/actuator\/**\")                 .authorizeHttpRequests((authorize) -> authorize.requestMatchers(\"\/actuator\/**\").permitAll());         return http.build();     } }<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433 docker \u0438 \u0432 \u043d\u0435\u043c \u0444\u0430\u0439\u043b docker-compose.yml \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 PostgreSQL:<\/p>\n<pre><code class=\"yaml\">services:   jmix-onboarding-postgres:     container_name: jmix-onboarding-postgres     image: postgres:latest     ports:       - \"5432:5432\"     volumes:       - postgres:\/var\/lib\/postgresql\/data       - storage:\/storage     environment:       - POSTGRES_USER=onboarding       - POSTGRES_PASSWORD=onboarding       - POSTGRES_DB=onboarding   Jmix-onboarding:     container_name: jmix-onboarding     image: jmix-onboarding:0.0.1-SNAPSHOT     ports:       - \"8080:8080\"     environment:       - DB_HOST=jmix-onboarding-postgres       - DB_USER=onboarding       - DB_PASSWORD=onboarding       - DB_PORT=5432       - DB_NAME=onboarding     depends_on:       - jmix-onboarding-postgres volumes:   postgres: {}   storage: {}<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 application-prod.properties \u0441 \u0434\u0430\u0442\u0430\u0441\u043e\u0440\u0441\u043e\u043c \u0434\u043b\u044f PostgreSQL \u0438\u0437 Docker:<\/p>\n<pre><code class=\"yaml\">main.datasource.url = jdbc:postgresql:\/\/${DB_HOST}:${DB_PORT}\/${DB_NAME} main.datasource.username = ${DB_USER} main.datasource.password =${DB_PASSWORD} jmix.localfs.storage-dir = \/storage<\/code><\/pre>\n<p>\u0414\u0430\u0442\u0430\u0441\u043e\u0440\u0441 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u044b\u0442\u0430\u0449\u0438\u043c \u0438\u0437 application.properties \u0432 application-dev.properties<\/p>\n<pre><code class=\"yaml\">main.datasource.url = jdbc:hsqldb:file:.jmix\/hsqldb\/onboarding main.datasource.username = sa main.datasource.password =<\/code><\/pre>\n<p> \u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 PostgreSQL \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0421\u0423\u0411\u0414 \u0432 \u0441\u0435\u043a\u0446\u0438\u044e dependencies \u0444\u0430\u0439\u043b\u0430 build.gradle<\/p>\n<pre><code class=\"yaml\">    runtimeOnly 'org.postgresql:postgresql'<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u043b\u0438\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 build.gradle \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u044f:<\/p>\n<pre><code class=\"kotlin\">bootRun {     args = [\"--spring.profiles.active=dev\"] }  tasks.named(\"bootBuildImage\") {     environment[\"BPE_APPEND_JAVA_TOOL_OPTIONS\"] = \" -Dspring.profiles.active=prod\" }<\/code><\/pre>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c Docker-\u043e\u0431\u0440\u0430\u0437:<\/p>\n<pre><code class=\"bash\">.\/gradlew bootBuildImage -Pvaadin.productionMode=true<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b:<\/p>\n<pre><code class=\"bash\"> docker compose -f .\/docker\/docker-compose.yml up -d<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u0434\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430:<\/p>\n<pre><code class=\"bash\">curl http:\/\/localhost:8080\/actuator\/prometheus<\/code><\/pre>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e docker\/config\/grafana\/provisioning\/datasources\/all.yaml \u0441 \u0434\u0430\u0442\u0430\u0441\u043e\u0440\u0441\u043e\u043c \u043f\u0440\u043e\u043c\u0435\u0442\u0435\u0443\u0441\u0430:<\/p>\n<pre><code class=\"yaml\">apiVersion: 1   datasources:   - name: Prometheus     label: Prometheus     type: prometheus     access: proxy     url: http:\/\/prometheus:9090     isDefault: true<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c Docker-\u0444\u0430\u0439\u043b \u0434\u043b\u044f Graphana docker\/config\/grafana\/Dockerfile<\/p>\n<pre><code class=\"bash\">FROM grafana\/grafana ADD .\/provisioning \/etc\/grafana\/provisioning<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c docker\/config\/prometheus.yml<\/p>\n<pre><code class=\"yaml\">scrape_configs:   - job_name: 'onboarding_monitoring'     scrape_interval: 5s     metrics_path: '\/actuator\/prometheus'     static_configs:       - targets: ['jmix-onboarding:8080']<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c docker\/monitoring.yml<\/p>\n<pre><code class=\"yaml\">services:   grafana:     build: '.\/config\/grafana'     user: root     ports:       - 3000:3000     volumes:       - .\/grafana:\/var\/lib\/grafana     environment:       - GF_SECURITY_ADMIN_USER=admin       - GF_SECURITY_ADMIN_PASSWORD=admin   prometheus:     image: prom\/prometheus     user: root     ports:       - 9090:9090     volumes:       - .\/config\/prometheus.yml:\/etc\/prometheus\/prometheus.yml       - .\/prometheus:\/prometheus<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433:<\/p>\n<pre><code class=\"bash\">docker compose -f .\/docker\/monitoring.yml start<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0439\u0442\u0438 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Prometheus, \u043e\u0442\u043a\u0440\u044b\u0432 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 <a href=\"http:\/\/172.17.0.1:9090\/\"><u>http:\/\/localhost:9090<\/u><\/a> \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u0443\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043c\u0435\u0442\u0440\u0438\u043a \u0442\u0430\u043c \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0439.<\/p>\n<h2> \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u043d\u0435\u043b\u0438 \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438<\/h2>\n<p>\u0414\u043b\u044f Grafana \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 JVM-\u0434\u0430\u0448\u0431\u043e\u0440\u0434 (<a href=\"https:\/\/grafana.com\/grafana\/dashboards\/4701-jvm-micrometer\/\"><u>https:\/\/grafana.com\/grafana\/dashboards\/4701-jvm-micrometer\/.)<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u041d\u043e \u043c\u044b \u043f\u043e\u0439\u0434\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u044b \u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Jmix \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0412 Jmix \u0443\u0436\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u0441\u0431\u043e\u0440 \u043c\u0435\u0442\u0440\u0438\u043a \u0434\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0435\u0434\u0438\u043d\u0438\u0446 &#8212; \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 (Views) \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445(Data Loaders) \u0438 \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0438 \u044d\u043a\u0440\u0430\u043d\u044b \u0438 \u043f\u0438\u0448\u0435\u0442\u0435 \u0432 \u043d\u0438\u0445 \u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e.  <\/p>\n<p> \u0414\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 jmix.ui.views<\/p>\n<p> \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u044d\u0433\u0438: lifeCycle, view \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u044f\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0437\u044b \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430:<\/p>\n<ul>\n<li>\n<p>Create<\/p>\n<\/li>\n<li>\n<p>Load<\/p>\n<\/li>\n<li>\n<p>Init<\/p>\n<\/li>\n<li>\n<p>Before show<\/p>\n<\/li>\n<li>\n<p>Ready<\/p>\n<\/li>\n<li>\n<p>Inject<\/p>\n<\/li>\n<li>\n<p>Before close<\/p>\n<\/li>\n<li>\n<p>After close<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043b\u044f Prometheus \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:  <\/p>\n<pre><code>jmix_ui_views_seconds_max{lifeCycle=\"load\",view=\"User.list\",} 0.0412709<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 jmix.ui.data<\/p>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u044d\u0433\u0438: lifeCycle, view, dataLoader \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u044f\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0437\u044b \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430:<\/p>\n<ul>\n<li>\n<p> Pre-load<\/p>\n<\/li>\n<li>\n<p> Load<\/p>\n<\/li>\n<li>\n<p>Post-load<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430\u043f\u0438\u0441\u044c \u043c\u0435\u0442\u0440\u0438\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d Id<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u0430\u0442\u0430\u043b\u043e\u0430\u0434\u0435\u0440\u0430 \u0434\u043b\u044f Prometheus:<\/p>\n<pre><code>jmix_ui_data_seconds_max{dataLoader=\"usersDl\",lifeCycle=\"load\",view=\"User.list\",} 0.005668899<\/code><\/pre>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430 <a href=\"http:\/\/172.17.0.1:3000\/\"><u>http:\/\/localhost:3000<\/u><\/a> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u0438 \u0432 \u043d\u0435\u0433\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u043e\u0440\u0441\u0430 Prometheus<\/p>\n<pre><code>jmix_ui_data_seconds_max{dataLoader=\"usersDl\"} -> dashboards<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 Explore \u0432\u044b\u0431\u0440\u0430\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0434\u0430\u0442\u0430\u0441\u043e\u0440\u0441 \u0438 \u0432\u0432\u043e\u0434\u044f \u0438\u043c\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u0435\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u044b\u0431\u043e\u0440\u0430. \u041f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e Run query \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0433\u0440\u0430\u0444\u0438\u043a\u0430. \u041d\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u0442.\u0435. \u043d\u0430\u0434\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u0437\u0430\u0439\u0442\u0438 \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<h2> \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0432\u043e\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438<\/h2>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 API Micrometer \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0432\u043e\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438: \u0442\u0430\u0439\u043c\u0435\u0440\u044b, \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0438. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u0432 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 User, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"java\">package com.company.onboarding.listener;  import com.company.onboarding.entity.User; import io.jmix.core.event.EntitySavingEvent; import io.micrometer.core.instrument.MeterRegistry; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.event.EventListener; import org.springframework.stereotype.Component;  @Component public class UserEventListener {      @Autowired     MeterRegistry meterRegistry;      @EventListener     public void onUserLoading(final EntitySavingEvent&lt;User> event) {         meterRegistry.counter(\"onboarding_on_user_save\").increment();     } }<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0438 \u043f\u043e\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u043c\u0438 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445.  <\/p>\n<figure class=\"full-width\"><\/figure>\n<h2>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 REST \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<p>\u0414\u043b\u044f Jmix \u0435\u0441\u0442\u044c \u0430\u0434\u0434\u043e\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043a \u043d\u0438\u043c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432 OpenAPI. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u0430\u0442\u0440\u0430\u0442\u0430\u043c\u0438 \u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 (backoffice) \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0442\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0442\u0430\u043a \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0441 \u043d\u0438\u043c\u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438.<\/p>\n<p>\u0414\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0430\u0434\u0434\u043e\u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 build.properties \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439:<\/p>\n<pre><code class=\"kotlin\">implementation 'io.jmix.authserver:jmix-authserver-starter'  implementation 'io.jmix.rest:jmix-rest-starter'<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u0432 \u0444\u0430\u0439\u043b\u0435 application.properties:<\/p>\n<pre><code class=\"yaml\"># The client id is my-client  spring.security.oauth2.authorizationserver.client.myclient.registration.client-id=my-client # The client secret (password) is my-secret  spring.security.oauth2.authorizationserver.client.myclient.registration.client-secret={noop}my-secret  # Enable Client Credential grant for the my-client  spring.security.oauth2.authorizationserver.client.myclient.registration.authorization-grant-types=client_credentials  # Client credentials must be passed in the Authorization header using the HTTP Basic authentication scheme  spring.security.oauth2.authorizationserver.client.myclient.registration.client-authentication_methods=client_secret_basic  # Use opaque tokens instead of JWT  spring.security.oauth2.authorizationserver.client.myclient.token.access-token-format=reference  # access token time-to-live  spring.security.oauth2.authorizationserver.client.myclient.token.access-token-time-to-live=24h jmix.authserver.client.myclient.client-id = my-client  jmix.authserver.client.myclient.resource-roles = user-management,<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-380274","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/380274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=380274"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/380274\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=380274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=380274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=380274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}