Hello i am trying to learn wildfly and springboot with a very simple application using eclipse. The project name is springboot-test. All the classes including the main method class are in the same package.
Main method class is called 'App' which has the following code:
@SpringBootApplication
@RestController
public class App {
@Autowired
private Student student;
public static void main(String[] args) {
SpringApplication.run(App.class, args);
}
@RequestMapping("/index")
public String sayHello()
{
return "hello from spring boot" + this.student.showAddress();
}
}
Here are the server logs:
11:36:57,281 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 68) WFLYUT0021: Registered web context: '/springboot-test-0.0.1-SNAPSHOT' for server 'default-server'
11:36:57,301 INFO [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "springboot-test-0.0.1-SNAPSHOT.war" (runtime-name : "springboot-test-0.0.1-SNAPSHOT.war")
11:36:57,408 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
11:36:57,411 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:8181/management
11:36:57,412 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:8181
11:36:57,412 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final) started in 11393ms - Started 504 of 732 services (353 services are lazy, passive or on-demand)
Url i am accessing is: http://localhost:8080/springboot-test/index