Created
November 30, 2018 14:02
-
-
Save ksakae1216/9819fe5d8a284ae015e6ddc4f6f74cd2 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 org.ksakae; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.context.ConfigurableApplicationContext; | |
@SpringBootApplication | |
public class SpringProject01StartApplication { | |
public static void main(String[] args) { | |
// 修正 | |
//SpringApplication.run(SpringProject01StartApplication.class, args); | |
ConfigurableApplicationContext cApp = SpringApplication.run(SpringProject01StartApplication.class, args); | |
SpringProject01StartApplication app = cApp.getBean(SpringProject01StartApplication.class); | |
app.hello(); | |
} | |
// メソッド追加 | |
public void hello() { | |
System.out.println("Hellow World"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment