Guest User

Untitled

a guest
Dec 10th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. foo.setName("FOOD")
  2.  
  3. @SpringBootApplication
  4. public class Application {
  5.  
  6. @Autowired
  7. private static Foo foo;
  8.  
  9. @Autowired
  10. private static Bar bar;
  11.  
  12. public static void main(String[] args) throws Throwable {
  13. SpringApplication.run(Application.class, args);
  14. foo.setName("FOOD");
  15. }
  16.  
  17. }
  18.  
  19.  
  20. @Component
  21. class Foo {
  22. private String name;
  23.  
  24. public String getName() {
  25. return name;
  26. }
  27.  
  28. public void setName(String name) {
  29. this.name = name;
  30. }
  31. }
Add Comment
Please, Sign In to add comment