Proof of concept (#6)

* Sample template created

* added findByName functionality for item

* Solve Cors errors and inhibit DefaultExposure

* changed project structure

* Added frontend

* Creation of base template (#1)

* changed base path of REST api and updated frontend api quering
This commit is contained in:
cato
2022-06-02 19:11:46 +02:00
committed by GitHub
parent edaf3c557e
commit f6385b40f6
32 changed files with 7031 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package whattocook.configs;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurer;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import whattocook.models.Item;
@Configuration
class RepositoryConfig implements RepositoryRestConfigurer {
@Override
public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config, CorsRegistry cors) {
config.exposeIdsFor(Item.class);
config.setBasePath("/api/v1");
}
}