---
title: "Discussion on \"Hướng dẫn tích hợp Groovy Script vào Spring boot project.\" | Hashnode"
description: "Discussion on \"Hướng dẫn tích hợp Groovy Script vào Spring boot project.\". Dĩ nhiên! Để cung cấp một giải pháp hoàn chỉnh từ pom.xml đến các lớp khác như Controller, Service,... cho yêu cầu của bạn, chúng ta sẽ thực hiện như sau:\n\nCập nhật pom.xml:\n\nĐảm bảo rằng bạn có tất cả các dependency cần thiết cho Spring Boot và Spri..."
url: "https://hashnode.com/posts/huong-dan-tich-hop-groovy-script-vao-spring-boot-project/6507d3f229ff3e29141b4234"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Hướng dẫn tích hợp Groovy Script vào Spring boot project.](https://technicaldeepdive.hashnode.dev/huong-dan-tich-hop-groovy-script-vao-spring-boot-project?utm_source=hashnode&utm_medium=feed)

Dĩ nhiên! Để cung cấp một giải pháp hoàn chỉnh từ pom.xml đến các lớp khác như Controller, Service,... cho yêu cầu của bạn, chúng ta sẽ thực hiện như sau: Cập nhật pom.xml: Đảm bảo rằng bạn có tất cả các dependency cần thiết cho Spring Boot và Spri...

Sep 18, 2023 · 2 min read · technicaldeepdive.hashnode.dev  
Read the article

-   [#groovy](https://hashnode.com/tag/groovy)

## Written by

[Donnie](https://hashnode.com/@technicaldeepdive)

@technicaldeepdive

  
[View profile](https://hashnode.com/@technicaldeepdive)

## Responses

Markdown supported · ⌘↵ to post

[Donnie](https://hashnode.com/@technicaldeepdive)

[Sep 18, 2023](https://hashnode.com/posts/huong-dan-tich-hop-groovy-script-vao-spring-boot-project/6507d3f229ff3e29141b4234/comment/6507d44c95e1a9033f227cd2)

Cách khác: dùng Bean Factory for (String beanName : beanNames) { if (beanFactory.containsBean(beanName)) { binding.setVariable(beanName, beanFactory.getBean(beanName)); } } hoặc lấy all bean: @Autowired private ApplicationContext applicationContext;

private Binding getBeansBinding() { Binding binding = new Binding(); String\[\] beanNames = applicationContext.getBeanDefinitionNames(); for (String beanName : beanNames) { binding.setVariable(beanName, applicationContext.getBean(beanName)); } return binding; }
