Skip to content
This repository was archived by the owner on Apr 16, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Oct 01 18:38:57 EEST 2017
#Fri Jan 26 16:32:35 EET 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-bin.zip
6 changes: 3 additions & 3 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

168 changes: 84 additions & 84 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions out/production/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
application:
base-url: "http://localhost:8080/api"
50 changes: 50 additions & 0 deletions out/production/resources/templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE HTML>

<html xmlns="http://www.w3.org/1999/html">
<head>
<title>Spring Boot - POST-GET AJAX Example</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
</head>
<body>

<div class="container">

<form id="greetingForm">
<div class="form-group">
<label for="message">Message:</label>
<input type="text" class="form-control" id="message" name="message" placeholder="message"> </input>
</div>
<button type="submit" class="btn btn-default">Send message</button>
</form>

<!-- Trigger the modal with a button -->
<button type="button" class="btn btn-info btn-lg" id="btnId">Open latest created message</button>

<!-- Bootstrap Modal -->
<div class="modal fade" id="modalId" role="dialog">
<div class="modal-dialog">

<!-- Bootstrap Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Header</h4>
</div>
<div class="modal-body">
<p id="greetingId"></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="/js/greeting.js"></script>
</body>
</html>
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include 'uniBlog'

15 changes: 15 additions & 0 deletions src/main/java/ro/ubb/istudent/controller/Comments.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package ro.ubb.istudent.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
* Created by catablack.
*/
@Controller
public class Comments {

@RequestMapping(value="/news/comments/{Id}",method= RequestMethod.GET)
public String news() {return "newsPage";}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ public String home() {
return "index";
}


}
37 changes: 37 additions & 0 deletions src/main/java/ro/ubb/istudent/controller/NewController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package ro.ubb.istudent.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

import java.util.HashMap;
import java.util.Map;

/**
* Created by catablack.
*/
@Controller
public class NewController {

// @RequestMapping(value = "/news", method = RequestMethod.GET)
// public String news() {
//
// return "news";
// }

/*
@RequestMapping(path = "/news", method = RequestMethod.GET)
public @ResponseBody
Map<String,String> sayHello() {

Map<String,String> stringStringMap= new HashMap<>();
stringStringMap.put("Hello","World");
return stringStringMap;
}
*/
@RequestMapping(value="/news",method=RequestMethod.GET)
public String news() {return "news";}


}
Loading