Skip to content

Instantly share code, notes, and snippets.

{
"list": [
{
"id": 4,
"firstName": "Theo",
"lastName": "Pendle"
}
]
}
{
"list": [
{
"id": 4,
"firstName": "Theo",
"lastName": "Pendle"
},
{
"id": 5,
"firstName": "Bruce",
@Mapper
public interface ClientMapper {
@Select("SELECT id as id, first_name as firstName, last_name as lastName FROM spring_demo.clients WHERE id = #{id}")
Client selectOne(long id);
@Select("SELECT id as id, first_name as firstName, last_name as lastName FROM spring_demo.clients")
List<Client> findAll();
@Insert("INSERT INTO spring_demo.clients (id, first_name, last_name) VALUES (#{id}, #{firstName}, #{lastName})")
@Service
public class ClientServiceImpl implements ClientService {
@Autowired
private ClientMapper clientMapper;
@Override
public Client getClient(final Long id) {
return clientMapper.selectOne(id);
}
<settings>
<pluginGroups>
<pluginGroup>org.sonarsource.scanner.maven</pluginGroup>
</pluginGroups>
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
@theopendle
theopendle / adobe-post-11226626.uml
Last active August 25, 2019 10:49
ACM API JSON flow
@startuml
participant "Unknown Entity" as Unknown
participant ACM
participant API
database Database
Unknown->API: {..."street": "this is a <b>\\\"</b> test" ...}
return {..."street": "this is a <b>\"</b> test" ...}
$(document).on('foundation-contentloaded', function() {
console.log('previewAssetActions.js loaded');
// Get the path to the AEM asset
let assetPath = window.location.pathname.replace('/assetdetails.html', '');
// Modify the href attribute of the Preview toolbar action
$('.customization-preview-asset-toolbar-action').attr('href',
window.location.origin
+ '/bin/imageViewerServlet?assetPath='
import com.google.common.net.MediaType;
import lombok.extern.slf4j.Slf4j;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.servlets.HttpConstants;
import org.apache.sling.api.servlets.SlingAllMethodsServlet;
import org.osgi.framework.Constants;
import org.osgi.service.component.annotations.Component;
import javax.servlet.Servlet;
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Properties"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryType="nt:unstructured">
<column