Notice AbstractResourceController
has the actual lookup methods (all of which work). But when an AbstractAssembler
implementation builds the links, we don't get the Controller
's base URL appended (compare theoutput.json
's self vs address ref)
View SpringDataRestConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Slf4j | |
@Configuration | |
public class SpringDataRestConfig { | |
private static final String BASE_PACKAGE = "com.example.yourapp"; | |
@Inject | |
private RepositoryRestConfiguration restConfig; | |
@Inject |
View SomeFeign.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@FeignClient(url = "${app.api.someService.baseUrl}") | |
public interface SomeFeign { | |
@RequestMapping(method = RequestMethod.POST, value = "/steps/", | |
produces = "application/json") | |
Step createStep(@RequestBody Step step); | |
@RequestMapping(method = RequestMethod.PUT, value = "/steps/{stepId}", | |
produces = "application/json") | |
Step updateStep(@RequestBody Step step, @PathVariable("stepId") Long stepId); | |
} |
View response.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
version:0, | |
id:26, | |
value:"bah", | |
name:"bahaha", | |
links:[ | |
{ | |
rel:"self", | |
href:"http://localhost:8078/api/twilio/steps/26{?projection}" | |
} |
View 1_note.md
View Foo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
public class Foo extends InstantiationAwareBeanPostProcessorAdapter implements BeanDefinitionRegistryPostProcessor { | |
@Override | |
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry defRegistry) throws BeansException { | |
DefaultListableBeanFactory registry = (DefaultListableBeanFactory) defRegistry; | |
Map<String,JpaRepository> repos = registry.getBeansOfType(JpaRepository.class); | |
// Repos is always empty :( | |
Set<Class<?>> entities = new Reflections("com.example").getTypesAnnotatedWith(Entity.class); | |
for(Class<?> entity : entities){ |
View Consumer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Consumer{ | |
// these work with qualifiers... | |
@Inject | |
private GenericService<User, Long> userService; | |
@Inject | |
private GenericService<Organization, Long> orgService; | |
} |
View SampleConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class SampleConfig<T> { | |
@Bean | |
public Service<T> service(){ | |
return new Service<T>(repo()); | |
} | |
@Bean | |
public Repository<T> repo(){ |
View BatchRequestController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
@RequestMapping("/$batch") | |
public class BatchRequestController { | |
@Inject | |
private List<RequestMappingHandlerMapping> mappings; | |
@Inject | |
private List<HandlerAdapter> handlerAdapters; |
View encrypt.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate our cert and key | |
openssl req -x509 -days 10000 -newkey rsa:2048 -keyout key.pem -out setup.crt -subj '/' | |
# Strip the password off the key | |
openssl rsa -in key.pem -out key.pem | |
# Encrypt our file | |
openssl smime -encrypt -aes256 -binary -outform PEM -in file.txt -out file.aes setup.crt | |
# Decrypt our file | |
openssl smime -decrypt -inform PEM -binary -in file.aes -inkey key.pem -out decrypted.txt |
View scan.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSID BSSID RSSI CHANNEL HT CC SECURITY (auth/unicast/group) | |
CenturyLink7173 fe:f5:28:2b:7f:40 -83 9,-1 Y US WPA(PSK/TKIP,AES/TKIP) WPA2(PSK/TKIP,AES/TKIP) | |
Holms01 40:4a:03:df:d3:77 -88 3 N -- WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP) |
OlderNewer