Skip to content
Snippets Groups Projects
Commit a25e2edc authored by Annika Geßmann's avatar Annika Geßmann
Browse files

Diverse Kleinigkeiten

parent e6d258c1
No related branches found
No related tags found
No related merge requests found
......@@ -32,18 +32,18 @@ public class GroupManagementController {
/**
* e.g. http://localhost:8080/groups/2/
*
* @param id
* @return
*/
@GetMapping(value = "/groups/{id}/")
public Group findByID(
@PathVariable(value = "id") long id
) {
final Group group = groupRepository.findByID(id);
return group;
}
// /**
// * e.g. http://localhost:8080/groups/2/
// *
// * @param id
// * @return
// */
// @GetMapping(value = "/groups/{id}/")
// public Group findByID(
// @PathVariable(value = "id") long id
// ) {
// final Group group = groupRepository.findByID(id);
//
// return group;
// }
}
package thinkTogether.groupManagement.model;
import javax.persistence.*;
import java.sql.Date;
@Entity
public class Cat {
......@@ -11,11 +12,15 @@ public class Cat {
private String name;
private Date date;
public Cat() {
}
public Cat(String name) {
public Cat(String name, Date date) {
this.name = name;
this.date = date;
}
public Long getId() {
......@@ -33,4 +38,12 @@ public class Cat {
public void setName(String name) {
this.name = name;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
}
......@@ -4,26 +4,24 @@ import javax.persistence.*;
import java.sql.Date;
@Entity
@Table(
schema = "thinktogether",
name = "group"
)
@Table(name = "group")
public class Group {
private static final int serialVersion = -1230;
@Id
@GeneratedValue
private Long ID;
@Column(name = "group_id")
private Long id;
@Column(name = "Status")
@Column(name = "status")
private String status;
@Column(name = "ErstellDatum")
@Column(name = "erstellDatum")
private Date datum;
@Column(name = "modul_ID")
@Column(name = "modul_id")
private int modul_id;
protected Group() {
......@@ -36,12 +34,12 @@ public class Group {
}
public void setID(Long id) {
this.ID = id;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return ID;
return id;
}
public Date getDatum() {
......
......@@ -10,7 +10,5 @@ import java.util.List;
public interface IGroupRepository extends CrudRepository<Group, Long> {
public List<Group> findAll();
public Group findByID(Long ID);
}
spring.datasource.url=jdbc:mariadb://thinktogether.mariadb.database.azure.com:3306/playground
spring.datasource.username=Nachtkind
spring.datasource.password=!13072020VerteilteSysteme
spring.jpa.show-sql=true
#spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
## Keep the connection alive if idle for a long time (needed in production)
#spring.datasource.testWhileIdle=true
##Hibernate Configuration
## Show or not log for each sql query
#spring.jpa.show-sql=true
## Hibernate ddl auto (create, create-drop, update): with "update" the database
## schema will be automatically updated accordingly to java entities found in
## the project
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment