Compare commits
	
		
			3 Commits
		
	
	
		
			a45e38b1f6
			...
			c274fc8414
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| c274fc8414 | |||
| caf11b5b19 | |||
| 
						
						
							
						
						0de7b69b1b
	
				 | 
					
					
						
@ -17,6 +17,7 @@ repositories {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
dependencies {
 | 
					dependencies {
 | 
				
			||||||
	implementation("org.springframework.boot:spring-boot-starter-jdbc")
 | 
						implementation("org.springframework.boot:spring-boot-starter-jdbc")
 | 
				
			||||||
 | 
						implementation("org.springframework.boot:spring-boot-starter-data-jpa")
 | 
				
			||||||
	implementation("org.springframework.boot:spring-boot-starter-mail")
 | 
						implementation("org.springframework.boot:spring-boot-starter-mail")
 | 
				
			||||||
	implementation("org.springframework.boot:spring-boot-starter-web")
 | 
						implementation("org.springframework.boot:spring-boot-starter-web")
 | 
				
			||||||
	// implementation("org.springframework.session:spring-session-jdbc")
 | 
						// implementation("org.springframework.session:spring-session-jdbc")
 | 
				
			||||||
 | 
				
			|||||||
@ -4,15 +4,15 @@ import org.springframework.web.bind.annotation.GetMapping;
 | 
				
			|||||||
import org.springframework.web.bind.annotation.CrossOrigin;
 | 
					import org.springframework.web.bind.annotation.CrossOrigin;
 | 
				
			||||||
import org.springframework.web.bind.annotation.RestController;
 | 
					import org.springframework.web.bind.annotation.RestController;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import ovh.herisson.Clyde.Ping;
 | 
					import ovh.herisson.Clyde.Responses.PingResponse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@RestController
 | 
					@RestController
 | 
				
			||||||
@CrossOrigin(origins = "http://localhost:5173")
 | 
					@CrossOrigin(origins = "http://localhost:5173")
 | 
				
			||||||
public class PingController {
 | 
					public class PingController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	@GetMapping("/ping")
 | 
						@GetMapping("/ping")
 | 
				
			||||||
	public Ping ping(){
 | 
						public PingResponse ping(){
 | 
				
			||||||
		return new Ping(1, "pong");
 | 
							return new PingResponse(1, "pong");
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -34,16 +34,4 @@ public class JdbcConfig {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		return source;
 | 
							return source;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	@Bean
 | 
					 | 
				
			||||||
	public WebMvcConfigurer corsConfigurer() {
 | 
					 | 
				
			||||||
		return new WebMvcConfigurer() {
 | 
					 | 
				
			||||||
			@Override
 | 
					 | 
				
			||||||
			public void addCorsMappings(CorsRegistry registry) {
 | 
					 | 
				
			||||||
				registry.addMapping("/greeting-javaconfig").allowedOrigins("*");
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		};
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +0,0 @@
 | 
				
			|||||||
package ovh.herisson.Clyde;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public record Ping(int id, String txt){};
 | 
					 | 
				
			||||||
@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					package ovh.herisson.Clyde.Responses;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public record PingResponse(int id, String txt){};
 | 
				
			||||||
		Reference in New Issue
	
	Block a user