Created
April 7, 2021 15:15
-
-
Save nemrosim/bd43c23c3d10d8aa7cc8ba97e265e9a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.nemrosim; | |
import com.nemrosim.models.User; | |
import com.nemrosim.services.UserService; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.annotation.AnnotationConfigApplicationContext; | |
public class Application { | |
public static void main(String[] args) { | |
ApplicationContext context = new AnnotationConfigApplicationContext(AppConfiguration.class); | |
UserService service = context.getBean("userService", UserService.class); | |
User user = service.findAll().get(0); | |
System.out.println(user.getFirstName()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment